Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
bharani8
Creator III
Creator III

Variable in an set analysis takes Total value instead of Row value

Hi Experts - Have posted this question before in a different manner.. But didn't get solution for that I had deep dive and found few more things.. At one point i got stuck, so will need the experts help on this to fix.

Here you go..

In the below table.. When i select the reporting month as Dec'16.. i get the right value under "vB2" column as 3645.. where as when i select more than a month (in this case Dec'16 & Jan'17) it gives me wrong number in "vB2" column.. and what i found is.. The variable (vFrac) which i used in creating "vB2".. it takes the total value (3) when we select more than 1 month instead of taking the value which is for that particular row(2).. Can you please help me to fix this ?

Have attached the files for your reference..

Capture.PNG

Thanks

Bharani

1 Solution

Accepted Solutions
sunny_talwar

What you pointed out here is not a problem with Fractile function, but something related to set analysis. Set analysis is evaluated once per chart, which is why it only picks a single Fractile value. Try using Aggr() instead

=Count(Aggr(If(sotat < Fractile(TOTAL <[Reporting Month]> sotat,.9), SCHEDULE_LOGIC), [Reporting Month], Key))


Capture.PNG

View solution in original post

6 Replies
sasiparupudi1
Master III
Master III

Please change your expression to count({<sotat = {'<Aggr($(vFrac),[Reporting Month])'}>} SCHEDULE_LOGIC)

Please mark the answer as correct and helpful if you are happy with the solution

hth

Sasi

bharani8
Creator III
Creator III
Author

Tried that.. i see all values changing to zero

Capture.PNG

sasiparupudi1
Master III
Master III

May be try changing vFrac to Fractile(total<[Reporting Month]>sotat,.9)

bharani8
Creator III
Creator III
Author

Still not working

sunny_talwar

What you pointed out here is not a problem with Fractile function, but something related to set analysis. Set analysis is evaluated once per chart, which is why it only picks a single Fractile value. Try using Aggr() instead

=Count(Aggr(If(sotat < Fractile(TOTAL <[Reporting Month]> sotat,.9), SCHEDULE_LOGIC), [Reporting Month], Key))


Capture.PNG

bharani8
Creator III
Creator III
Author

Thanks a lot for your explanation!! Works Perfectly!