Visualising a count of two string columns

sx200n

New Member
Joined
Jan 5, 2017
Messages
4
Hello,

I need assistance on what should be a simple task.

I am currently setting up Power BI for our business where as previously they have been using IBM Cognos, or just straight Excel file outputs with lots of tables of countifs and sumifs, etc. The most complex they had were pivot tables in Excel.

I am pretty new to power BI and am still getting used to the slight formula and syntax differences from excel. I am trying to setup a sales dashboard and I need to build a measure that will count the distinct string values in one column with the possible values being - Blank, Product 1, Product2, Product 3 or Product 4. I then need the same measure to do the same count on a second column that will contain the same 5 possible values (but never the same in each column except blanks). So Product 1 can appear in either of the two columns, but never both, etc.

They basically represent addon products that are attached to single product sale and the customers can have a choice of two addon products. So each sales line in the database will contain either two blank values in these columns, one blank and one product, or two different products.

I have tried a CALCULATE(distinct count)), and have even added conditional columns in Power Query to do the lookup, so I have 4 additional columns titled Product 1, Product 2, etc that now have a 1 or a zero if it applies to that policy line.

But neither method (the calculate/disctinct count) or the additional column with a 1 or zero allow me to visualise them in a simple bar chart.

First of all, before I query if I am trying to visualise them correctly. Is there a way to create a simple aggregate or measure in Power BI that will give me a total count of each product string over the two columns?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top