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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rishikeshtiwari
Creator
Creator

How to Calculate MTD Based on 2 fields

Hi Guys,

I have a table. In this table we are maintaining a time-sheet records.Based on this Excel sheet we need to develop 3 fields for each Month.

Suppose we are calculating these three fields for Sept.

1: Total Expected Occurances: In First row we will check from 06/September-12/September to 27/September-03/October.

   Here we are getting 4 three times and 0 one time.So result will 3+1=4. If we will get any number then it will count 1.

   If it will get NA then count=0.In second row it is getting NA.So count will 0.

2:In Case of field Occurances >= 4 logic is that if it will get any value more than or equals 4 it will return result 1 otherwise 0.

  It is counting how much time 4 or more than 4 is present in that row of that month.

  For Ist row it is getting 4 four times but second time no value.

3:MTD for Month=Occurances >= 4  /  Total Expected Occurances

Using same logic we need to develop all the Months MTD.

Could you please suggest this logic how to implement in Qlikview script.I need to prepare a MTD Chart for All the GBU for each Month.

Is it possible to handel in bach-end script.I am able to Calculate 2 fields on front end but MTD values are not coming correct.

Waiting for ur response.

0 Replies