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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.