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: 
priyarane
Specialist
Specialist

Comparision in Setanalysis

Hi Community,

How to compare the below expression below expressions

if(

only({<%Month = {'$(=$(=vCurrMonth))'} >} PD_Val) >

only({<%Month = {'$(=$(=vPrevMonth))'} >} PD_Val),

sum(RWA))


And I wanted to have expression like


Sum(Current PD_value > Prev PD_Value RWA)



4 Replies
swuehl
MVP
MVP

Sorry, I don't really understand your setting.

Could you post some sample records and expected result?

Do you need to evaluate the PD_Val comparison for both months on a per-record base with regard to RWA?

Or is your first expression working correct and you want to transform it somehow (why?)?

priyarane
Specialist
Specialist
Author

Hi Swuehl,

I am using dimension - PD_Val but all values are not coming. That's why I am changing expression to full set.

- Priya

priyarane
Specialist
Specialist
Author

when I select a particular PD Value then it is appearing correct one if nothing selected then showing previous pd value.

swuehl
MVP
MVP

Sorry, still not understanding how your data model works. Any chance to upload a small sample?

If PD_Val is your dimension, I am unsure how you want to make a comparison between PD_Val in your expression.

Maybe using chart inter record functions like above()?

Or is the boolean condition something you want to evaluate in total context? You can do this e,g, by creating a variable

vTest:

=only({<%Month = {'$(=$(=vCurrMonth))'} >} PD_Val) > only({<%Month = {'$(=$(=vPrevMonth))'} >} PD_Val)

which should return zero or -1

Then in your chart:

=if( vTest, sum(RWA))

But honestly, I am just guessing aorund..