Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Icon for Impactful Individual rankImpactful Individual
28 days ago
Solved

Data Labels and Y Axis - Dynamic Format String

i am using dynamic string for measures in my below shown bar chart, i am using below measure as example , i want to how data labels and Y axis values in thousands or millions with two decimal places ...
  • ryan_mayu's avatar
    27 days ago

    powerbiexpert22​ 

    you can try this

     

    VAR SelectedMeasure = ABS([Measure])
    
    RETURN
    
        SWITCH(
    
            TRUE(),
    
            SelectedMeasure < 1000,
    
                "#,0",
    
    
    
            SelectedMeasure < 1000000,
    
                "#,0,.0""K""",
    
    
    
            SelectedMeasure < 1000000000,
    
                "#,0,,.0""M""",
    
    
    
            "#,0,,,.0""B"""
    
        )

     

     

    pls see the attachment below