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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

help in set analysis

Hello

Got a chart by MonthYear

I want to count the distinct TPKs having the fact that the waste Ratio is > defined threshold

check attached file and help please as when I select a specified month and year the number differs from when no selection is made on the month and year

knowing that the waste ratio (refer to vWasteRatioRelativeThreshold gives correct results

I can walk on water when it freezes
6 Replies
Anonymous
Not applicable

Hope i have observed the calculations properly.

I notice that the difference comes because of the below condition.

CALENDAR_DATE={">= $(vFromDate) <=$(vToDate)"}

here the vToDate value is getting changed everytime you select a month the last date of the month is assigned to this variable.

but the vFromDate is still kept to be at the beginning of the year.

and hence the data is filtered only for that particular period. and hence the calculation also differs.

Hope this helps.

Aadil

ali_hijazi
Partner - Master II
Partner - Master II
Author

yes and when I select a month Year it will fall between vFromDate and vToDate

there shouldn't be any difference

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II
Author

cause what I want is that when user select a specific month this means the chart will show result from starting day of the year till selected month

I can walk on water when it freezes
Anonymous
Not applicable

Just a doubt, that without making any selections. whatever values the bar chart shows. is that correct. Because when i do the same thing with IF conditions i am getting different figured. So just wanted to know if you have verified the numbers and are they correct.

rajeshvaswani77
Specialist III
Specialist III

Dear Ali,

If I eliminate from set analysis

TPK={"=($vWasteRatioRelativeThreshold)) > $(vPercentThreshold)"}

The values show fine in the bar chart

This means this condition here is having the issue.

Also I notice that the variable vWasteRatioRelativeThreshold has a formula that uses TestID

You will have to check this part.

Thanks,

Rajesh Vaswani

stigchel
Partner - Master
Partner - Master

The value for  vWasteRatioRelativeThreshold changes when you select a month.  If you want this to be a constant for e.g. the year, change the set analysis for the calendar_date for this variable.