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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

First two weeks

I have a report that uses a fiscal_month and fiscal_week and this will produce a monthly report and a weekly report.

What i am now trying to do is to say the following:

if(

   // Show week and month report for first two weeks of the month

   'X',

   //else only show weekly report for the last 2 weeks of the month.

    'Y'

    )

I have the condition to show the report working; i am just trying to figure out how to show the weekly and monthly for the first two weeks and the weekly for the 3 and 4 week.

Any ideas?

1 Reply
Anil_Babu_Samineni

Perhaps any one of these?

If(Sum({<Month = {'$(=Max(Month))'}, Week = {">=$(=Min(Week)) <=$(Min(Week+1))"}>} Measure),'X',

If(Sum({<Month = {'$(=Max(Month))'}, Week = {">=$(=Max(Week)) <=$(Max(Week-1))"}>} Measure),'Y'))

OR

Sum(Aggr(If(Sum({<Month = {'$(=Max(month))'}, Week = {">=$(=Min(Week)) <=$(Min(Week+1))"}>} Measure),'X',

If(Sum({<Month = {'$(=Max(month))'}, Week = {">=$(=Max(Week)) <=$(Max(Week-1))"}>} Measure),'Y')), Month, Week))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful