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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Specialist
Specialist

Calculate the sum of all values present in the current month

Hello All,

I have below data set :-

Aspiring_Developer_0-1631542377048.png

I want to calculate the sum of nbhours in a KPI that show the value as 96, i.e  Sum of all the values present in current month.

Kindly help.

 

Thanks in advance

 

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({<INPUT_DATE = {">=$(=Date(MonthStart(Today(1)), 'M/D/YYYY'))<=$(=Date(Floor(MonthEnd(Today(1))), 'M/D/YYYY'))"}>} NB_HOURS)

or this

Sum({<Input_MonthName = {"$(=Date(MonthStart(Today(1)), 'MMM YYYY'))"}>} NB_HOURS)

View solution in original post

1 Reply
sunny_talwar

Try this

Sum({<INPUT_DATE = {">=$(=Date(MonthStart(Today(1)), 'M/D/YYYY'))<=$(=Date(Floor(MonthEnd(Today(1))), 'M/D/YYYY'))"}>} NB_HOURS)

or this

Sum({<Input_MonthName = {"$(=Date(MonthStart(Today(1)), 'MMM YYYY'))"}>} NB_HOURS)