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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Dom87326
Helper II
Helper II

Dynamic number format for Card visual

Hello, 

 

I want to set a dynamic format for Card that shows Revenue amount.

 

Revenue =
VAR _sumRev =
    CALCULATE ( SUM ( 'Fact'[Revenue] ) )
RETURN
    FORMAT (
        _sumRev,
        SWITCH ( TRUE (),
            LEN ( _sumRev ) + 1 - 1 > 8,
            //"#,##0.##", 
            LEN ( _sumRev ) + 1 - 1 < 8,
            //"#,##0.##"
        )
    )

 


If value is in billions, to display 1 000 000 K if it's less than billion, full number. 

Thanks for help!


1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Dom87326 , you should check like

 

return

Switch( True(),

_sumRev >1000000000, format(_sumRev/1000, "### ### ### \K")

_sumRev&""

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Dom87326 , you should check like

 

return

Switch( True(),

_sumRev >1000000000, format(_sumRev/1000, "### ### ### \K")

_sumRev&""

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hey @amitchandak , 

Thanks for you reply, however format functions doesn't recognize specified format string "### ### ### \K" and I get text type result below for number <1000000000:
2021-11-28 15_32_50-PBI error.pngIs it possible to amend that and by adding currency symbol in the beginning and removing decimals?
My locale is set to English (UK) 

@Dom87326 , Add currency symbol in the format or append as string before

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.