Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
My Dimension : 'ProdnDate' has data in the format as 2019-01-30.
My Measure : Duration
How do i show only yesterday's duration in a KPI?
Thank you and regards.
This expression should work. You may have to adjust the function (I'm assuming you want the Sum) or the date format.
Sum({<ProdnDate={"=$(=date(today()-1,'YYYY/MM/DD'))"}>} Sales)
I hope this helps.
It looks like your suggestion will include all dates larger than yesterday.
Sum({<ProdnDate={">=$(=date(today()-1,'YYYY/MM/DD'))"}>} Sales)
If you only want yesterday's value you can adjust to an expression similar to this.
Sum({<ProdnDate={"=$(=date(today()-1))"}>} Sales)
Oops. Forgot to remove the > from the example I pasted. I've corrected mine above. Thanks @Vegar . I'd leave the date format in though.