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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Mahamood0218
Helper II
Helper II

Remove zero's from column

Hello PBI Experts ,

i have a requirement to remove leading 0 zero from table by using dax fucntion 

Mahamood0218_0-1659097621063.png

Output :

Mahamood0218_1-1659097661414.png

must be deine dax fuction could you please suggest this issue.

 

Thanks&Regards,

shaik

2 ACCEPTED SOLUTIONS
ImkeF
Community Champion
Community Champion

Hi @Mahamood0218 ,
you can add a column with this formula: 
Text.Trim([Values], "0")

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

Jos_Woolley
Solution Sage
Solution Sage

Since you asked for a solution in DAX, this Calculated Column:

 

New Column =
VAR MyValue = 'Table'[Values]
VAR T1 =
    ADDCOLUMNS(
        GENERATE(
            VALUES( 'Table'[Values] ),
            GENERATESERIES( 1, LEN( 'Table'[Values] ), 1 )
        ),
        "MyChar", MID( 'Table'[Values], [Value], 1 )
    )
RETURN
    MID(
        'Table'[Values],
        MINX(
            FILTER( T1, 'Table'[Values] = MyValue ),
            IF( [MyChar] <> "0", [Value] )
        ),
        LEN( 'Table'[Values] )
    )

 

Regards

View solution in original post

4 REPLIES 4
Jos_Woolley
Solution Sage
Solution Sage

Since you asked for a solution in DAX, this Calculated Column:

 

New Column =
VAR MyValue = 'Table'[Values]
VAR T1 =
    ADDCOLUMNS(
        GENERATE(
            VALUES( 'Table'[Values] ),
            GENERATESERIES( 1, LEN( 'Table'[Values] ), 1 )
        ),
        "MyChar", MID( 'Table'[Values], [Value], 1 )
    )
RETURN
    MID(
        'Table'[Values],
        MINX(
            FILTER( T1, 'Table'[Values] = MyValue ),
            IF( [MyChar] <> "0", [Value] )
        ),
        LEN( 'Table'[Values] )
    )

 

Regards

@Jos_Woolley now dax fuction is working thanks for help.

Mahamood0218_0-1659331748863.png

 

ImkeF
Community Champion
Community Champion

Hi @Mahamood0218 ,
you can add a column with this formula: 
Text.Trim([Values], "0")

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

@ImkeF i have try your formula this is also working ,thanks for help.

Mahamood0218_1-1659331848529.png

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.