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.
Using calculation group, measures can be selectively replaced in a placeholder measure as explained in the article:
The requirement is not only to selectively replace the measure but replace the measure format as well.
The placeholder measure's format needs to be changed as per the measure being substituted e.g. decimal, whole, percentage etc.
The example taken for this requirement is bit contrived but the same solution can be applied to some other real world valid examples.
Steps:
1. Download the pbix file from https://www.sqlbi.com/articles/using-calculation-groups-to-selectively-replace-measures-in-dax-expre...
2. In report "F02", when PriceToUse = "Net Price", show the "Margin %" column with 3 decimals as below:
3. In report "F02", when PriceToUse = "Unit Price", show the "Margin %" column with 2 decimals as below:
Thanks.
Solved! Go to Solution.
I think the requirement can not be implemented.
The reason being "Format String Expressions" option is not available to regular measures, only available to calculation items.
Here [Margin %] being a regular measure, only static "format string" can be applied, not dynamically based on the calculation item selection using "Format String Expressions".
It would be a good feature addition, being able to apply dynamic formatting to regular measures using "Format String Expressions".
I think the requirement can not be implemented.
The reason being "Format String Expressions" option is not available to regular measures, only available to calculation items.
Here [Margin %] being a regular measure, only static "format string" can be applied, not dynamically based on the calculation item selection using "Format String Expressions".
It would be a good feature addition, being able to apply dynamic formatting to regular measures using "Format String Expressions".
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
40 | |
21 | |
20 | |
13 |
User | Count |
---|---|
125 | |
42 | |
39 | |
27 | |
24 |