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: 
jean1
Contributor II
Contributor II

Trellis Bar Chart Object Bug

I think there may be a bug with the Trellis object. I get incorrect aggregate results when using a bar chart within the trellis object vs a KPI object. The formula I am using is;


ALT(
count(distinct {<
APPOINTMENT_STATUS_DETAILED = {'NOT SOLD','SOLD'}
$(vDimSet),
APPOINTMENT_TYPE_DESCRIPTION = {'1st Bridal Appointment','2nd Bridal Appointment'}>}

IF (TRANSACTION_DATE >= [CUSTOMER TRUE SOCIETY ACTIVE DATE], PK_APPOINTMENT_ID) ),0)

 

The dimension I am using for both KPI and Bar Chart master objects is 'STORE_NAME'.

 

On KPI the formula correctly picks up the dimension values and calculates/groups by STORE_NAME, but on bar chart it doesn't pick up the dimension values and repeats the summary amounts.

KPI grouping and aggregating correctly;

jeanette_4-1653681780561.png

 

Bar chart grouping but not aggregating/filtering to correct dim values;

 

jeanette_3-1653681707679.png

#trellis #barchart #qliksense #help

Labels (2)
6 Replies
jean1
Contributor II
Contributor II
Author

@vinieme12 any ideas? saw you answered another post that mentioned trellis, thanks!

vinieme12
Champion III
Champion III

try without alt

ALSO ensure Advanced mode is turned on

 

=count({<
APPOINTMENT_STATUS_DETAILED = {'NOT SOLD','SOLD'}
$(vDimSet)
,APPOINTMENT_TYPE_DESCRIPTION = {'1st Bridal Appointment','2nd Bridal Appointment'}

,PK_APPOINTMENT_ID={"=TRANSACTION_DATE >= [CUSTOMER TRUE SOCIETY ACTIVE DATE]"}

>} PK_APPOINTMENT_ID)

 

also it would be best to create a flag field in load script 

if(TRANSACTION_DATE >= [CUSTOMER TRUE SOCIETY ACTIVE DATE],1,0) as flag_field

the use flag_field={'1'} in set analysis,

this will be more performant than row level comparison in set analysis

 

refer this for more

https://www.youtube.com/watch?v=BKx3oO9rI7M

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
jean1
Contributor II
Contributor II
Author

Hi @vinieme12  I tried the formula above and it unfortunately is still calculating it as the full aggregate for all stores instead of the # of appts just for that single store (the selected group by dim) in the bar graph. I do have advanced mode turned on -- it calculates correctly in the KPI viz, just not the bar graph viz. Any other ideas?

 

 

vinieme12
Champion III
Champion III

Can you post a sample app here, unfortunately I don't have access to open qvf files

but someone else will surely take a look

@MarcoWedel @stevedark @rubenmarin 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @jean1 

It may be that the trellis chart is not expecting you to have a bar chart with no dimension. I don't see why you wouldn't just have a single bar chart with a bar for each store?

Also, it looks like you are using set analysis to have a different expression for each store. Are there multiple measures in the trellis? The way the trellis should work is that you have a single expression and then you pick a dimension to create a chart for each trellis.

I would definitely recommend going for a really simple expression (e.g. count(distinct PK_APPOINTMENT_ID) ) and then build it up bit by bit.

Hope that helps.

Steve

jean1
Contributor II
Contributor II
Author

@vinieme12 I cannot share a sample app, apologies!

@stevedark What I posted above was after dropping all the other measures to have it be as simplistic as possible for testing. The actual viz is grouped by store, but there are multiple bars to represent performance in categories/etc.

I do believe this is a bug specific to the bar chart/trellis viz combination. It worked fine in KPI viz, and I ended up recreating my original bar chart viz with the combo bar/line viz so I can assign color 'in' the viz instead of by using the 'master' functionalities so that I don't need to use Advanced mode to have the specific colors assigned correctly showing instead of the default rainbow colors. (This is why I was using advanced mode -- the colors assigned in the master viz/measures/dims were not rendering unless in advanced mode).