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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kapildua16
Helper I
Helper I

Dynamic Format String Showing Incorrect Value in Card Visual

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

  • 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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.