Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Solved! Go to Solution.
Hi @Julia_Mav ,
I was supposed to post this earlier but forgot to hit reply...
Is Product a separate dimensions table? If so:
You can see in the below screenshot that your formula should work fine assuming your the correct setup is used.
Please see attached pbix for you reference.
Proud to be a Super User!
Hi @Julia_Mav ,
Thanks for the reply from @danextian , please allow me to provide another insight:
Try the following expression:
Market Share % =
VAR _CurrentCategory = SELECTEDVALUE('Product details'[Product Category])
VAR _TotalSalesAllProductsInCategory =
CALCULATE(
[Sales $],
ALL('Product'),
'Product details'[Product Category] = _CurrentCategory
)
RETURN
DIVIDE(
[Sales $],
_TotalSalesAllProductsInCategory
)
Alternatively, you can try using calculated columns instead of measures, which are static values added to a table and calculated row by row as the data is loaded. In contrast, a measure is a dynamic value that changes depending on what you are looking at in the report, calculated dynamically in the context of the visual object's filters. More detailed information can be found at the link:
Understanding Measures vs Calculated Columns in Power BI (gorilla.bi)
If these still didn't solve your problem. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Julia_Mav
What is this for?
Please provide context?
By 100% you mean, you want the total to be always 100% even if the sum of the breakdown isn't? Please elaborate. Provide a workable sample data that isn't an image and your expected result from that sample data.
Proud to be a Super User!
Thank you @danextian.
Hi @Julia_Mav ,
I was supposed to post this earlier but forgot to hit reply...
Is Product a separate dimensions table? If so:
You can see in the below screenshot that your formula should work fine assuming your the correct setup is used.
Please see attached pbix for you reference.
Proud to be a Super User!
User | Count |
---|---|
77 | |
74 | |
60 | |
60 | |
46 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |