Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Timste
Contributor II
Contributor II

static KPI

Hello, I need a static KPI for the last 30 days with no reference to the filters. What I'm doing wrong?

That's my function:

Sum({1< date = {"=date >= Today() - 30"} >} [sales])

 

This function for last month works fine, but i need last 30 days. Where is the difference?

Sum( { 1< [date.autoCalendar.MonthsAgo]={1} > } [sales] ) 

Thank you!

Labels (2)
2 Replies
MayilVahanan
MVP
MVP

Hi @Timste 

Try like below

Sum({1< date = {">= $(=Date(Today() - 30,'YourDateFormat')"} >} [sales])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Timste
Contributor II
Contributor II
Author

Hey Mayil, thank you for the reply but this doesn't work for me. Maybe my function was a little bit confusing because of the fieldname "date". So this is my function. This works fine without using filters.

Sum({1< invoicedate = {"=invoicedate >= Today() - 30"} >} [sales])

I also tried it with the dateformat, but without success. Any idea?