Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
111 | |
93 | |
87 | |
35 | |
35 |
User | Count |
---|---|
154 | |
102 | |
82 | |
64 | |
54 |