Forum Discussion
measure schedule performance
- 3 years ago
Hi jalaomar ,
Sorry for late back, I modify the formula:
% Performance = DIVIDE ( DATEDIFF ( MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Tollgate] = "ITG 0" && 'Table'[Baseline] = "Actual Date" ), 'Table'[Date] ), MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Baseline] = "Actual Date" && 'Table'[Tollgate] = MAX ( 'Table'[Tollgate] ) ), 'Table'[Date] ), DAY ), DATEDIFF ( MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Tollgate] = "ITG 0" && 'Table'[Baseline] = "Actual Date" ), 'Table'[Date] ), MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Baseline] = "Planned Date" && 'Table'[Tollgate] = MAX ( 'Table'[Tollgate] ) ), 'Table'[Date] ), DAY ) )Get the correct result:
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, Thanks for supporting with this.
but just found that the %Performance is not calculating as I would like to.
below you can view the expected calculation and outcome
so for each tollgate calculate the datediff = Actual ITG0 - Contract ITG0
ITG0 % Performance = Actual ITG0 / Contract ITG0
ITG0.1 % Performance = Actual ITG0.1-Actual ITG0 / Contract ITG0.1 - Contract ITG0
ITG1 % Performance = Actual ITG1-Actual ITG0 / Contract ITG1 - Contract ITG0
After each tollgate the % performance is always calculated against ITG0.
Hope you can follow what I mean. Is there a way to tweak the measure you have created a little bit?
Hi jalaomar ,
Sorry for late back, I modify the formula:
% Performance =
DIVIDE (
DATEDIFF (
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Tollgate] = "ITG 0"
&& 'Table'[Baseline] = "Actual Date"
),
'Table'[Date]
),
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Baseline] = "Actual Date"
&& 'Table'[Tollgate] = MAX ( 'Table'[Tollgate] )
),
'Table'[Date]
),
DAY
),
DATEDIFF (
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Tollgate] = "ITG 0"
&& 'Table'[Baseline] = "Actual Date"
),
'Table'[Date]
),
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Baseline] = "Planned Date"
&& 'Table'[Tollgate] = MAX ( 'Table'[Tollgate] )
),
'Table'[Date]
),
DAY
)
)
Get the correct result:
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jalaomar3 years agoHelper IV
Hi v-yanjiang-msft , thanks for looking into this.
but so wierd, have tried several times and i am getting the following error when trying your measure. Do you know why?
- v-yanjiang-msft3 years agoCommunity Support
Hi jalaomar ,
Maybe your fact data is more complicated than my sample, you can seperately return each part in the formula to check which part can't get the correct result than dig it.
Best Regards,
Community Support Team _ kalyj- jalaomar3 years agoHelper IV
Will do so!
just another question in the meantime. Have created 2 measures and want to create another measure with some IF statment. so if Project Group column is "PACKAGING" then display measure1 and if Project Group column is "Processing System" & "Processing Key Comp." then display measure 2.
Thinks it's simple solution but can't get my head around it.
- jalaomar3 years agoHelper IV
Hi v-yanjiang-msft is it possible to share your pbix? I can't stil not make the measure work for me.
Thanks!
- v-yanjiang-msft3 years agoCommunity Support