Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ramp1985
Contributor II
Contributor II

Calculation inside set analysis

Hi Guys,

I'm new to QlikSense, and tried to find an answer for this in the community, but didn't.

What i'm trying to, is to make a measure that will count the distinct numbers of a Dimension, if a certain calculation is above zero 0,-. = How many unique customers revenue is larger this year than last year?.

So, something like (This dosn't work):

Count(distinct{<sum({<Year={$(=Max(Year))}>} Revenue)  -  Sum({<Year={$(=Max(Year)-1)}>} Revenue) ={>"0"}>} Customer)

Looking forward to hear from you!

 

 

Labels (3)
1 Solution

Accepted Solutions
MayilVahanan

Hi @ramp1985 

Try like below

Sum(Aggr(If(sum({<Year={$(=Max(Year))}>} Revenue)  -  Sum({<Year={$(=Max(Year)-1)}>} Revenue) >=0, 1), Customer))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi @ramp1985 

Try like below

Sum(Aggr(If(sum({<Year={$(=Max(Year))}>} Revenue)  -  Sum({<Year={$(=Max(Year)-1)}>} Revenue) >=0, 1), Customer))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ramp1985
Contributor II
Contributor II
Author

Works - thanks!