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: 
amit_saini
Master III
Master 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
sunny_talwar

Why don't you try this

Dimension

Week

Expression

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


Capture.PNG

View solution in original post

4 Replies
Anil_Babu_Samineni

May be share sample to test?

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
amit_saini
Master III
Master III
Author

PFA!

Regards,

AS

sunny_talwar

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
Master III
Master III
Author

Thank you once again!

Regards,

AS