Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey Everyone,
I am trying to re-create a tableau report on Power BI. In tableau I have a matrix like this (rows: product name, product version; column: os version; values: # of machines, % of machines)
there is just one primary field for values - # of machines. The % of machines here is the % for each "product name". in tableau we have the option to show value as percentage and compute using "pane" where as in Power BI I can only show percentages as row total, column total or grand total. How do I replicate this % calculation in Power BI?
I tried to use a measure to calculate this:
Here is what my pbi matrix looks like currently (incorrect):
Thanks!
Solved! Go to Solution.
I think this should do it.
MeasureC =
DIVIDE (
SUM ( 'Product Versions'[# of Machines] ),
CALCULATE (
SUM ( 'Product Versions'[# of Machines] ),
ALLSELECTED ( 'OS Version Order' ),
ALLSELECTED ( 'Product Versions'[product_version] )
)
)
It looks like you want your denominator to be the total for that Product Name. In this case, you don't really need ISINSCOPE.
MeasureC =
DIVIDE (
SUM ( 'Product Versions'[# of Machines] ),
CALCULATE (
SUM ( 'Product Versions'[# of Machines] ),
ALLSELECTED ( 'Product Versions' ),
ALLEXCEPT ( 'Product Versions', 'Product Versions'[Product Name] )
)
)
Hey @AlexisOlson ,
Thanks for your reply. Yes, the denominator should be the total for that product name. I tried your measure but I still don't get the correct numbers (PFA image below). I am looking to make the rows showing totals at the product name level "100%" (highlighted cells below) and then the break up by product version.
There's some filter or context that I'm not seeing. Any chance you can share the file or some sample version of it?
Hey @AlexisOlson ,
Sure thing. Here's the link to the sample file on my drive. Please do let me know if you're having any trouble downloading it. Thanks.
Best,
Akash
I think this should do it.
MeasureC =
DIVIDE (
SUM ( 'Product Versions'[# of Machines] ),
CALCULATE (
SUM ( 'Product Versions'[# of Machines] ),
ALLSELECTED ( 'OS Version Order' ),
ALLSELECTED ( 'Product Versions'[product_version] )
)
)
Hmm. Are there any tables involved other than 'Product Versions'?
Hey @AlexisOlson ,
Nope. this is the only primary table. I just use another table just to get the OS versions in my desired order
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |