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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
ABC11
Resolver I
Resolver I

Matrix Measure if condition calculation

Hello,
I would like to have condition - if sum of equipment hrs is >179 then display otherwise put 0(do not want to see nagative)
I am getting error. Please, help me here
 
Diffe =
sumx(
SUMMARIZE(
'LEM FACT with query',
'LEM FACT with query'[VENDOR_NAME],
'LEM FACT with query'[CTR#],
'LEM FACT with query'[WORKDATE].[Year],
'LEM FACT with query'[WORKDATE].[Quarter],
'LEM FACT with query'[WORKDATE].[Month],
'LEM FACT with query'[EQUIPNUM],
'LEM FACT with query'[VENDEQUIPUNIT],
'LEM FACT with query'[EQUIPRATETYPE]
),

if(CALCULATE(SUM('LEM FACT with query'[EQUIPHRS])>179)),SUM('LEM FACT with query'[EQUIPHRS])-179),0)
)
 
 
Thanks lots
1 ACCEPTED SOLUTION
ABC11
Resolver I
Resolver I

3 REPLIES 3
ABC11
Resolver I
Resolver I

This is sloved.

Hello TO all

In this  measure I am getting row level sum correct but column total incorrect.

Please, help me

More_than_170hrs =
sumx(
SUMMARIZE(
'LEM FACT with query',
'LEM FACT with query'[VENDOR_NAME],
'LEM FACT with query'[CTR#],
'LEM FACT with query'[WORKDATE].[Year],
'LEM FACT with query'[WORKDATE].[Quarter],
'LEM FACT with query'[WORKDATE].[Month],
'LEM FACT with query'[EQUIPNUM],
'LEM FACT with query'[Vendequipunit_Combine],
'LEM FACT with query'[EQUIPRATETYPE]
),

if(CALCULATE(SUM('LEM FACT with query'[EQUIPHRS])>170),CALCULATE(170-sum('LEM FACT with query'[EQUIPHRS])),0)
)
 
Thanks

Just ignor this last reply I open up new topic.

Sorry for confusion

Helpful resources

Announcements
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.