Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Achieve this logic

Hi All,


If there are 5 Weeks in the last month of the Quarter, consider 3 Weeks Quantity as “In Transport” and if there are 4 Weeks, consider 2 Weeks Quantity as “In Transport”



How to Achieve this logic and i don't have sample data.

3 Replies
MarcoWedel

Can you create a short table consisting of some input values and a description of your required result?

pooja_prabhu_n
Creator III
Creator III

Hi Prasanth,

You can calculate the week number using the below formula:

'Week'&Ceil(Day(Date)/7) as  Week


Then use the below logic to consider the 3 weeks or 2 weeks quantity.

Aggr( Round(Max(Ceil(Day(Date)/7))/2),MONTH)


I have attached sample qvw file for your reference.

Anonymous
Not applicable
Author

Thank you Nagaraj....