Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

nossamprasanth
New Contributor

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

Re: How to Achieve this logic

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

pooja_prabhu_n
Contributor III

Re: How to Achieve this logic

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.

nossamprasanth
New Contributor

Re: How to Achieve this logic

Thank you Nagaraj....

Community Browser