Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.

3 Replies
Anil_Babu_Samineni

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

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

Or

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)