Forum Discussion
smather
3 years agoHelper III
Dataverse - Dynamics 365, Track Stage Changes
Hi there Would there be a way (preferably in DAX tho if it needs to be done within Power Query, that's fine) to view what stage an oppotunity was in the last 24 hours? EG: A job was at Propos...
Anonymous
3 years agoNot applicable
Hi smather ,
Take [Active Stage] as an example to check if this is the result you want.
Active Stage2 =
VAR _MAX_DATETIME =
CALCULATE(
MAX('Table'[Modified On]),
FILTER(
ALL('Table'),
'Table'[Project Ref]=MAX('Table'[Project Ref])
)
)
VAR _LAST_STAGE =
CALCULATE(
MAX('Table'[Active Stage]),
FILTER(
ALL('Table'),
'Table'[Project Ref]=MAX('Table'[Project Ref])
&&'Table'[Modified On]<_MAX_DATETIME
&&'Table'[Modified On]>=_MAX_DATETIME-1
)
)
VAR _RESULT = IF(MAX('Table'[Modified On])=_MAX_DATETIME,_LAST_STAGE)
RETURN
_RESULT
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
smather
3 years agoHelper III
Hi Anonymous - i've tried your formula on a sep table, where modified on is the only thing connected (to the date table) and I'm afriad it still just gives me blank values, any ideas? 😞