Forum Discussion
Anonymous
6 years agoNot applicable
First time fix
Hello, I am new to PowerBI and I'd like to ask for a help with creating the following DAX function. Data set example: Installation number Service ticket number ST date created ...
v-lili6-msft
6 years agoCommunity Support
hi, Anonymous
You could try this formula to get your requirement:
Measure 2 =
VAR nextcreatedate =
CALCULATE (
MIN ( 'Table'[ST date created] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Installation number] = MAX ( 'Table'[Installation number] )
&& MAX ( 'Table'[ST date closed] ) < 'Table'[ST date created]
)
)
RETURN
VAR days =
IF (
nextcreatedate = BLANK (),
DATEDIFF ( MAX ( 'Table'[ST date closed] ), TODAY (), DAY ),
DATEDIFF ( MAX ( 'Table'[ST date closed] ), nextcreatedate, DAY )
)
RETURN
IF ( days >= 90, "First time", "No" )
Result:
Best Regards,
Lin
- SAU11113 years agoFrequent Visitor
How to create a First time fix %