Forum Discussion
Cbutler
5 years agoHelper III
Previous value not working??
Hi there, I have a simple table which outlines a measure name, the RAG of that measure against a date (quarter ending date). The table doesnt have dates for every day, just on the quarter endi...
- 5 years ago
Hi,
This calculated column formula works
Column = LOOKUPVALUE('RAG by measure ID'[RAG],'RAG by measure ID'[Measure ID],'RAG by measure ID'[Measure ID],'RAG by measure ID'[Date],CALCULATE(MAX('RAG by measure ID'[Date]),FILTER('RAG by measure ID','RAG by measure ID'[Measure ID]=EARLIER('RAG by measure ID'[Measure ID])&&'RAG by measure ID'[Date]<EARLIER('RAG by measure ID'[Date]))))Hope this helps.
Greg_Deckler
5 years agoCommunity Champion
Cbutler Can you post that data as text so that I can recreate it in a PBIX file? I don't want to type all that.
- Cbutler5 years agoHelper III
Thanks, I've extracted some of the data, can you access this link?
link removed- Ashish_Mathur5 years agoSuper User
Hi,
This calculated column formula works
Column = LOOKUPVALUE('RAG by measure ID'[RAG],'RAG by measure ID'[Measure ID],'RAG by measure ID'[Measure ID],'RAG by measure ID'[Date],CALCULATE(MAX('RAG by measure ID'[Date]),FILTER('RAG by measure ID','RAG by measure ID'[Measure ID]=EARLIER('RAG by measure ID'[Measure ID])&&'RAG by measure ID'[Date]<EARLIER('RAG by measure ID'[Date]))))Hope this helps.
- Cbutler5 years agoHelper III
Yes Ashish_Mathur thank you! 🙂 That's got it.
Out of interest, do you know Ashish_Mathur Greg_Deckler why PreviousQuarter didnt work for this calc?
I have done similar measures in other reports and it has worked great, but this one wasnt having any of it and I don'y understand why....?
Thanks again for your help both.