Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi @Everyone
I’m trying to replicate a Tableau-like behavior in Power BI with dynamic formatting for a commission measure. I created a measure with the following DAX:
commission_formatted_new =
SUMX(fact, fact[fee] * fact[rate_factor])
I then applied a dynamic format string using this DAX:
VAR currency = SELECTEDVALUE('currency'[Destination Currency Symbol], "*")
VAR currentvalue = [commission_formatted_new]
RETURN
SWITCH(TRUE(),
currentvalue <= 1000, currency & " #,0.00",
currentvalue <= 1000000, currency & " #,0,.00K",
currentvalue <= 1000000000, currency & " #,0,,.00M",
currentvalue <= 1000000000000, currency & " #,0,,,B"
)
What could be causing this inconsistency between the table and card visuals? Am I missing something about how dynamic format strings work in Power BI?
Any insights would be greatly appreciated!
Thanks!
Solved! Go to Solution.
Change the format setting in the card from Auto to None.
Otherwsie auto overrise you dynamic settings in the Card
Please click thumbs up and accept solution
my value = 8421234
Format rule =
VAR currency = "$"
VAR currentvalue = [my value]
RETURN
SWITCH(TRUE(),
currentvalue <= 1000, currency & " #,0.00",
currentvalue <= 1000000, currency & " #,0,.00K",
currentvalue <= 1000000000, currency & " #,0,,.00M",
currentvalue <= 1000000000000, currency & " #,0,,,B"
)
Change the format setting in the card from Auto to None.
Otherwsie auto overrise you dynamic settings in the Card
Please click thumbs up and accept solution
my value = 8421234
Format rule =
VAR currency = "$"
VAR currentvalue = [my value]
RETURN
SWITCH(TRUE(),
currentvalue <= 1000, currency & " #,0.00",
currentvalue <= 1000000, currency & " #,0,.00K",
currentvalue <= 1000000000, currency & " #,0,,.00M",
currentvalue <= 1000000000000, currency & " #,0,,,B"
)
Change the format setting in the card from Auto to None.
Otherwsie auto overrise you dynamic settings in the Card
Please click thumbs up and accept
solution
@kapildua16 , Try using
commission_formatted_new =
SUMX(fact, fact[fee] * fact[rate_factor])
commission_formatted_display =
VAR currency = SELECTEDVALUE('currency'[Destination Currency Symbol], "*")
VAR currentvalue = [commission_formatted_new]
RETURN
SWITCH(TRUE(),
currentvalue < 1000, currency & " " & FORMAT(currentvalue, "#,0.00"),
currentvalue < 1000000, currency & " " & FORMAT(currentvalue / 1000, "#,0.00") & "K",
currentvalue < 1000000000, currency & " " & FORMAT(currentvalue / 1000000, "#,0.00") & "M",
currentvalue < 1000000000000, currency & " " & FORMAT(currentvalue / 1000000000, "#,0.00") & "B",
currency & " " & FORMAT(currentvalue, "#,0.00")
)
Proud to be a Super User! |
|