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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Aditya_Chitale
Specialist
Specialist

Set Analysis not working in Box plot

Hi All,

I have designed a box plot showing distribution of sales for various Product Names but for some strange reason, when I am applying set analysis on the sales measure, some of the product names are not showing on the Y-axis.

Data used:

test:
load * inline
[
ProductName,category,sales,Date
A,Pharma,100,3/31/2022
A,brush,200,4/31/2022
A,gum,300,5/31/2022
A,mouse,400,6/31/2022
A,wood,500,7/31/2022
A,plant,600,8/31/2022

B,Tools,100,9/31/2022
B,Pharma,200,10/31/2022
B,brush,300,11/31/2022
B,mouse,400,12/31/2022
B,wood,500,1/31/2021
B,plant,600,2/31/2021

C,Soil,100,3/31/2021
C,plant,200,4/31/2021
C,Pharma,300,5/31/2021
C,brush,400,6/31/2021
C,Gauge,500,1/31/2020
C,mouse,600,2/31/2020

D,Medicine,100,3/31/2020
D,brush,200,4/31/2020
D,wood,300,5/31/2020
D,Tools,400,6/31/2020

E,Blood,100,7/31/2020
E,brush,200,8/31/2020
E,Gauge,300,9/31/2020
];

 

Measure expression used:

Sum({<Date={">=$(=Date(Addmonths(max(Date),-2)))<=$(=Date(max(Date)))"}>}sales)

The date range which is getting evaluated using this expression is : >=10/31/2022<=12/31/2022.

Product Name 'A'  falls under this date range but its not showing in box plot or maybe I am making mistake in understanding the chart. Any help in correcting expression or understanding chart working would be appreciated.

 

Aditya_Chitale_0-1656080541996.png

 

Regards,

Aditya

Labels (1)
  • SaaS

1 Reply
humbold2024
Contributor
Contributor

I have the same problem as Aditya, that Set analysis is not working properly in a boxplot. My intention is that when in the Month filter 3 (March) is chosen, the data 1-3 (January-March) is shown. Unfortunately, only data for month 3 is shown.

Set expression in Boxplot Measure:

sum(
  {<
    month = {"<=$(=max(month))"}
  >}
sales)

Data:

test:
load * inline
[
ProductName,category,sales,year,month,salesnr
A,Pharma,100,2022,3,s1
A,brush,200,2022,3,s2
A,gum,300,2022,2,s3
A,mouse,400,2022,4,s4
A,wood,500,2022,1,s5
A,plant,600,2022,2,s6

B,Tools,100,2022,2,s7
B,Pharma,200,2022,3,s8
B,brush,300,2022,1,s9
B,mouse,400,2022,2,s10
B,wood,500,2022,1,s11
B,plant,600,2022,2,s12

C,Soil,100,2022,3,s13
C,plant,200,2022,3,s14
C,Pharma,300,2022,2,s15
C,brush,400,2022,2,s16
C,Gauge,500,2022,1,s17
C,mouse,600,2022,2,s18

D,Medicine,100,2022,2,s19
D,brush,200,2022,4,s20
D,wood,300,2022,1,s21
D,Tools,400,2022,2,s22

E,Blood,100,2022,2,s23
E,brush,200,2022,1,s24
E,Gauge,300,2022,2,s25
];

I found an Community-Question from the year 2017, where is mentionned, that this is a bug (Boxplots and set analysis - Qlik Community - 1386098).

Does anyone know, if this is still the case and if yes, problem solving ist planned?

Regards,

Christoph