Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
kapildua16
Helper I
Helper I

Dynamic Format String Showing Incorrect Value in Card Visual

Hi @Anonymous 
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"
)

  • In a table visual, the formatting works as expected (e.g., $8.42M).
  • However, in a card visual, it shows an incorrect value like $0.00MM.

    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!



 

 

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

 

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"
)

 

speedramps_1-1739882938454.png

 

speedramps_2-1739883002397.png

 

speedramps_3-1739883033251.png

 

View solution in original post

3 REPLIES 3
speedramps
Super User
Super User

 

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"
)

 

speedramps_1-1739882938454.png

 

speedramps_2-1739883002397.png

 

speedramps_3-1739883033251.png

 

speedramps
Super User
Super User

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 

 

speedramps_0-1739882736529.png

 

bhanu_gautam
Super User
Super User

@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")
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.