Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
newuser
Creator II
Creator II

TRellis Charts Not Showing Data

I have a weird issue with Trellis charts (something I’m hoping to incorporate eventually into an nPrinting report). The Trellis chart I’m trying to set up is as follows:

 

  • Trellis dimension: paymentyear
  • Master visualization: pie chart using the following measure (and grouped by “paymentmethod”)

 

The error I’m getting says the trellis chart cannot be displayed due to negative or zero values. Any thoughts on how to resolve?

 

This link says potentially set analysis can cause an issue with trellis charts? I’ve verified the master visualization on its own does render a pie chart successfully.

 

The set analysis below in the master visualization is to ensure each year goes up to and including the most recent month of the most recent year. E.g., if current year month is Feb, the other years would span through Feb but not beyond to compare apples-to-apples, i.e., Jan-Feb19, Jan-Feb20, Jan-Feb21.

Master visualization measure:

newuser_0-1644850125537.png

count({$<[paymentyear] = {">=$(=max({$}[paymentyear])-2)"},

                [paymentmonth] = {"<=$(=max({$<[paymentyear]={$(=max({$}[paymentyear]))}>} [paymentmonth]))"}>}

    distinct Payment )

newuser_1-1644850125555.png

 

 

2 Replies
chris_djih
Creator III
Creator III

I would suggest to make a more simple check for the YTD comparison.

try to add this to your (calendar) table :

IF( NUM(NUM(Month(DateField),'00') &NUM(Day(DateField),'00'))
<= NUM(Month(today()),'00')&NUM(Day(today()),'00'),1,0) AS DateField_YTD,

Then you can easily make the Set-Analysis looks like {<DateField_YTD={1}>}.

Furthermore: check the mastervisualisation for all possible dimension values (select the years one by one). if the maste visualisation shows the below zero error as well for some years, there seems to be something odd within your data model.

If you found help, mark the correct answer and give some likes to ALL contributors, that tried to help.
newuser
Creator II
Creator II
Author

Thanks for the tip; I got it to work with a combination of making the set analysis simpler, recreating the trellis and master visualization, and utilizing delivered advanced mode keywords n my set analysis (as well as turning advanced mode on). I ran into a another issue though: the pie/donut charts in my trellis aren't showing % values for all slices; the smaller slices do not show the value label. Is there a way around this issue of the smaller slice values not showing?