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
Anonymous
Thank you for this! It's not currently working, but I believe that's my error. Modified On isn't connected to my Date table (I'm using PO Rec), so I think that's why it's pulling back blanks. There is the ability to ultilise USERELATIONSHIP but I'm unsure where about in the formula to enter it?