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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Bashir_Nadaf
Helper I
Helper I

how to calculate percentage from 2 column

HI Community 

i am trying to calculate the percentage of only expired row 

can please help how to manage with DAX  to achieve this 

 

Expiry status and Available quantity both are column

 

Expiry StatusAvailable quantity
Expired11,27,200
Not expired1,79,82,238
TOTAL1,91,09,438
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Bashir_Nadaf ,

The easy method is put the field "Available quantity" onto Values options and show values as "Percent of grand total" just as below screenshot.

yingyinr_0-1654765555124.png

Or you can create a measure as below to get it,  you can find the details in the attachment.

Measure = 
VAR _expired =
    CALCULATE (
        SUM ( 'Table'[Available quantity] ),
        'Table'[Expiry Status] = "Expired"
    )
VAR _all =
    CALCULATE ( SUM ( 'Table'[Available quantity] ), ALLSELECTED ( 'Table' ) )
RETURN
    DIVIDE ( _expired, _all, 0 )

yingyinr_1-1654765817563.png

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Bashir_Nadaf ,

The easy method is put the field "Available quantity" onto Values options and show values as "Percent of grand total" just as below screenshot.

yingyinr_0-1654765555124.png

Or you can create a measure as below to get it,  you can find the details in the attachment.

Measure = 
VAR _expired =
    CALCULATE (
        SUM ( 'Table'[Available quantity] ),
        'Table'[Expiry Status] = "Expired"
    )
VAR _all =
    CALCULATE ( SUM ( 'Table'[Available quantity] ), ALLSELECTED ( 'Table' ) )
RETURN
    DIVIDE ( _expired, _all, 0 )

yingyinr_1-1654765817563.png

Best Regards

Thank you so much @Anonymous 😊😊
This post helped me alot 

rajulshah
Resident Rockstar
Resident Rockstar

Hello @Bashir_Nadaf ,
Can you please provide raw data?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors