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: 
Ross1991
Contributor III
Contributor III

KPI for selected date

Date             Time Spent

3/5/2024            5

3/15/2024          8

4/17/2024          7

4/24/2024          5

I have one table with above information.  I need to make a KPI where it only need show month of March's Sum.  Anyone can tell me what formula I need?  Thanks in advance.     

Labels (1)
1 Solution

Accepted Solutions
rubenmarin
MVP
MVP

Hi, you can use an expression like: Sum({<Date={"=Month(Date)=3"}>} [Time Spent])

Or create a month field in script: Num(Month(Date)) as MonthNum

And use as Sum({<MonthNum={3}>} [Time Spent])

View solution in original post

2 Replies
rubenmarin
MVP
MVP

Hi, you can use an expression like: Sum({<Date={"=Month(Date)=3"}>} [Time Spent])

Or create a month field in script: Num(Month(Date)) as MonthNum

And use as Sum({<MonthNum={3}>} [Time Spent])

Ross1991
Contributor III
Contributor III
Author

Thank you.  It worked.   I am going to try that formula on Bar Graph as well.