Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

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))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)