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: 
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....