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: 
Not applicable

Set Analysis in a 2 dimensional stacked bar chart.

All,

I have a stacked bar chart with two dimensions in it, one being LOG_MONTH and the other being OPERATOR_CODE.  My expression is SUM(LOGGED_VALUE).  What I'm trying to acheive is to check for null values in LOGGED_VALUES and if found then use the previous month's LOGGED_VALUE.  I can't seem to write the correct set analysis for this one.  Any help?

1 Reply
shree909
Partner - Specialist II
Partner - Specialist II

Hi ,

in the expression u need to write an if condition

first create variable for previous month and use that varaible in the set analysis

if(logged_values =null()  or isnull(loggedvalues)  or len(trim(logged_values))=0, sum({<Month ={'$(vpreviousmonth)'>}loggedvalue),sum loggedvalue)