Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
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.
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |