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: 
Not applicable

MTD Issue

Hello All,

I have a scenario where i need to calculate MTD and YTD hoursworked of a an individual. I am getting the total right but in the straight table I am not getting the desired output.

I have got this output

Date Name Hours StartTime EndTime Vendor Work_type Class Job Description MTD YTD
13.9 13.9
2017-01-01Adam Newman6.901-01-2017 07:01:0001-01-2017 13:55:00PLANT ENGINEERING CONSTRUCTION PTEContracatorDIRECTFORMAN - FOREMAN6.96.9
2017-01-02Adam Newman0.202-01-2017 17:45:0002-01-2017 18:00:00PLANT ENGINEERING CONSTRUCTION PTEContracatorDIRECTFORMAN - FOREMAN0.20.2
2017-01-03Adam Newman6.803-01-2017 07:01:0003-01-2017 13:54:00PLANT ENGINEERING CONSTRUCTION PTEContracatorDIRECTFORMAN - FOREMAN6.86.8

But i need something like this:

Date Name Hours StartTime EndTime Vendor Work_type Class Job Description MTD YTD
13.9 13.9
2017-01-01Adam Newman6.901-01-2017 07:01:0001-01-2017 13:55:00PLANT ENGINEERING CONSTRUCTION PTEContracatorDIRECTFORMAN - FOREMAN6.96.9
2017-01-02Adam Newman0.202-01-2017 17:45:0002-01-2017 18:00:00PLANT ENGINEERING CONSTRUCTION PTEContracatorDIRECTFORMAN - FOREMAN7.17.1
2017-01-03Adam Newman6.803-01-2017 07:01:0003-01-2017 13:54:00PLANT ENGINEERING CONSTRUCTION PTEContracatorDIRECTFORMAN - FOREMAN13.913.1

The Exptression which i am using is : =SUM({<date_num={">=$(vMTD_Start)<=$(vMTD_End)"}>}Hours)

Tried the rangesum function but its not working.

Any help would be appreciated.

Labels (1)
3 Replies
Anil_Babu_Samineni
MVP
MVP

Which chart is this, We have option called Full Accumulation ?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar
MVP
MVP

This should work if your original expression worked

=RangeSum(Above(TOTAL SUM({<date_num={">=$(vMTD_Start)<=$(vMTD_End)"}>}Hours), 0, RowNo(TOTAL)))

or use the full accumulation on the expression tab of chart properties (only available for straight table)

Anil_Babu_Samineni
MVP
MVP

Or

Rangesum(Below(SUM({<date_num={">=$(vMTD_Start)<=$(vMTD_End)"}>}Hours),0),Above(Hours,1,1000))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful