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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.