Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |