Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_u
Partner - Contributor
Partner - Contributor

On a stacked bar chart show last month sum of sales in a year and sum of sales in the last month of a quarter

Hello all community members,

I am new to Qlik Sense and I am stuck with a problem which I have presented below for a dummy data.

I have table with fields: 'Product Name', 'Date', 'Sale mode', 'Sales'.

The data is for 4 years 2017, 2018, 2019, 2020.

'Sale mode' is simply 3 options: 'online', 'cash', 'card'.

I created a master item dimension as a drill down including 'Date.Year', 'Date.Quarter', 'Date.Month' together and named it 'DateYQM'.

Then I created a stacked bar chart with dimensions as: 'DateYQM' and 'Sale mode'.

I want to write expression for measure in such a way I get the following results:

1. When no selection is made, only last month (i.e. Dec) sum of sales should be seen on the bars of each year.

2. When a year is selected, then only the sum of sales for the last month in each quarter should be displayed (i.e sum of sales for Mar for Q1, Jun for Q2, Sep for Q3, Dec for Q4).

3. When a particular quarter is selected then, then simply the sum of sales for each month should be displayed. 

Please help.

I have attached the .qvf file for your reference.

Labels (2)
0 Replies