Forum Discussion
Dynamic Formatting with DirectLake Semantic Model
- 1 year ago
Hi ryan0585 ,
Sorruy I should have check this sooner but the dynamic format strigs are not available for Report Measures not only for Direct Lake but for all semantic models in the service:
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Yeah so the second bullet there. We'd like to use the switch statement to evaluate the user's metric selection, then return a measure value in the appropriate format. Some sample DAX here we're using in the semantic model for the Format = "Dynamic" selection. Unfortunately, we just can't take this same approach ATM in a local .pbix file connected to that semantic model.
VAR SelMeasure = SELECTEDVALUE('metric'[metric_id])
RETURN
SWITCH(
SelMeasure,
16, "#,0;-#,0;#,0",
18, "#,0;-#,0;#,0",
2, "0.0%;-0.0%;0.0%",
3, "0.0%;-0.0%;0.0%",
4, "0.0%;-0.0%;0.0%",
5, "#,0;-#,0;#,0",
47, "#,0;-#,0;#,0",
6, "0.0%;-0.0%;0.0%",
7, "0.0%;-0.0%;0.0%",
8, "0.0%;-0.0%;0.0%"
)
Hi ryan0585 ,
Sorruy I should have check this sooner but the dynamic format strigs are not available for Report Measures not only for Direct Lake but for all semantic models in the service:
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
- ryan05851 year agoAdvocate II
Got it, hopefully this enhancement is added in the future, or "Dynamic" as a formatting option is removed if it isn't to be an enhancement when dynamic formatting is our of preview mode. In its current implementation, when connected to a live semantic model, it does come off as more of a bug because you can select it as a formatting option but the behavior doesn't mirror the functionality of other connection methods. Thank you though.