Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NewUser1
Contributor II
Contributor II

How to show only yesterday's value in KPI

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.

Labels (4)
3 Replies
lblumenfeld
Partner Ambassador
Partner Ambassador

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.

Vegar
MVP
MVP

@lblumenfeld 

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)

lblumenfeld
Partner Ambassador
Partner Ambassador

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.