Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
New to Power Bi. Can find similiar queries, but the basic set up of the raw data is different so i can't seem to make the responses work.
So i have my raw data that is imported which looks like this:
Site Name | Product Name | RANGE |
Site A | Product A | 1 |
Site A | Product B | 1 |
Site A | Product C | 1 |
Site A | Product D | 1 |
Site B | Product A | 1 |
Site B | Product B | 0 |
Site B | Product C | 1 |
Site B | Product D | 0 |
Site C | Product A | 1 |
Site C | Product B | 0 |
Site C | Product C | 0 |
Site C | Product D | 1 |
Site D | Product A | 1 |
Site D | Product B | 1 |
Site D | Product D | 0 |
Hoping for a solution which allows for the number of sites can change and the number of products.
I can get the data to display like this:
Product A | Product B | Product C | Product D | |
Site A | 1 | 1 | 1 | 1 |
Site B | 1 | 0 | 1 | 0 |
Site C | 1 | 0 | 0 | 1 |
Site D | 1 | 1 | 1 | |
TOTAL | 4 | 2 | 2 | 3 |
What i want to be able to do is to display the data like:
Product A | Product B | Product C | Product D | |
Total True | 4 | 2 | 2 | 3 |
Total False | 0 | 2 | 1 | 1 |
Percent | 100% | 50% | 66% | 75% |
Site A | 1 | 1 | 1 | 1 |
Site B | 1 | 0 | 1 | 0 |
Site C | 1 | 0 | 0 | 1 |
Site D | 1 | 1 | 1 |
Note how there was no response for Site D Product C, so it is ignored in the totals.
Is this possible.
Also can these total fieds be locked so if i had 200 sites and scrolled down, i would still see my 3 total rows.
Thanks for any help.
The best first step for you is to create some measures. Assuming your data table is called 'RawData':
Total True = SUM('RawData'[RANGE])
Total False = COUNTROWS('RawData')-[Total True]
Percent = DIVIDE([Total True],[Total True]+[Total False])
Once you've created these 3 measures, I think the best solution for you is to create two visuals. One matrix showing product by site, as you have it already, and another just showing the totals and percentages, using the measures you've just created. I cannot think of a way of doing what you want in one visual.
User | Count |
---|---|
131 | |
71 | |
70 | |
58 | |
54 |
User | Count |
---|---|
194 | |
95 | |
65 | |
62 | |
53 |