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
Anonymous
Not applicable

Add formula from a list of column in a table or table matrix

I have a list of task that should be percentage value should be distributed equaly and 1 task which is a NTTP is calculate differently if the total percentage is >100% then 0% should reflect to maintain the rest to 100% but whenever I calculate it, it just evenly distribute the %total to each task and when sum it is over 100% (Task + NTTP value)

This is what I have now

CNXTglobe_0-1646786403845.png

This is what I'm trying to 

CNXTglobe_1-1646786687409.png

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _sum =
    CALCULATE (
        SUM ( 'Table'[NT_MAIN%_Acnt] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Category_Grp] <> "NTTP" )
    )
VAR _SUMALL =
    SUMX ( ALL ( 'Table' ), 'Table'[NT_MAIN%_Acnt] )
VAR RESULT_ = 1 - _sum
VAR _IF =
    IF (
        MAX ( 'Table'[Category_Grp] ) = "NTTP"
            && _SUMALL > 1,
        RESULT_,
        MAX ( 'Table'[NT_MAIN%_Acnt] )
    )
RETURN
    _IF

vpollymsft_0-1646963820878.png

I have also create the formula in the column.

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _sum =
    CALCULATE (
        SUM ( 'Table'[NT_MAIN%_Acnt] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Category_Grp] <> "NTTP" )
    )
VAR _SUMALL =
    SUMX ( ALL ( 'Table' ), 'Table'[NT_MAIN%_Acnt] )
VAR RESULT_ = 1 - _sum
VAR _IF =
    IF (
        MAX ( 'Table'[Category_Grp] ) = "NTTP"
            && _SUMALL > 1,
        RESULT_,
        MAX ( 'Table'[NT_MAIN%_Acnt] )
    )
RETURN
    _IF

vpollymsft_0-1646963820878.png

I have also create the formula in the column.

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Kudoed Authors