Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

amit_saini
Honored Contributor III

Logic Help !!!

Hi Folks,

I'm calling below dim and exp in a line chart:

Dim :

=if(isnull(GetFieldSelections(Week))=0,

if(Week<=SubField(GetFieldSelections(Week),',',-1),Week),

if(isnull(GetFieldSelections(Month))=0,

Week<=aggr(max(Week),$Field),

if(Week<=53,Week)))

Exp:

rangesum(above((Count(DISTINCT{<Month,Year={'2017'},Week,

Product_Group_N={'CVS'},

Complaint_Classification={'0-km Complaint'},Complaint_Type_Description={'Supplier'}>} NRQNR)),0,RowNo()))

Now when I'm selecting any week lets say in below case 7 , it should show all the prior weeks including 7 , which is working absolutely fine. See below:

The same concept should work for Month also, when I'm selecting Feb , it should show me all weeks data from Jan until selected Feb , but currently it's not working this way.

Any suggestions???

Regards,

AS

1 Solution

Accepted Solutions

Re: Logic Help !!!

Why don't you try this

Dimension

Week

Expression

RangeSum(Above((Count(DISTINCT{<Year={'2017'},Month, Week = {"$(='<=' & Max(Week))"}>} CVS)),0,RowNo()))


Capture.PNG

4 Replies

Re: Logic Help !!!

May be share sample to test?

amit_saini
Honored Contributor III

Re: Logic Help !!!

PFA!

Regards,

AS

Re: Logic Help !!!

Why don't you try this

Dimension

Week

Expression

RangeSum(Above((Count(DISTINCT{<Year={'2017'},Month, Week = {"$(='<=' & Max(Week))"}>} CVS)),0,RowNo()))


Capture.PNG

amit_saini
Honored Contributor III

Re: Logic Help !!!

Thank you once again!

Regards,

AS

Community Browser