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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
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)