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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dwyane
Contributor II
Contributor II

Single Line Chart multiple dimensions

Hi All,

 

I have a table that looks like this 

MonthProductExpectedActualName
1abc10%3%a
1abc10%4%b
1abc10%1%c
1abc10%4%d
2abc20%7%a
2abc20%9%b
2abc20%14%c
2abc20%19%d

 

I want to create a line chart that shows the months on the x axis and the expected and actual on the y axis. Ideally i would like the legend to show the product and names (so single lines for each name and one line for expected)

 

From reading the forums i believe Qlik does not support multiple dimension and expression. Is there any other way to achieve this? I have tried many things but cant get it to work. Thanks in advance!

5 Replies
Dalton_Ruer
Support
Support

In Month 1 you have 4 Names for Product ABC. Are you Aggregating your Expected/Actual %'s in some way? Or are you using 4 different lines as Set Analysis or IF Expressions? Each Name would then be in the legend. 

I assume that you actually have more than just a single Product "ABC" and not sure how that will work for you in a single chart. 

The best I think you can hope to accomplish by TRELLISING the Line Chart so that each value for PRODUCT will have it's own line chart. https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Trellis_Setting...

Trellis.png

Dwyane
Contributor II
Contributor II
Author

The user will be filtering on a product line and so only one product line will be available at any one time in the chart. I would like 1 line for expected so in the example for month 1 it would plot at 10% and then i would like to see 4 names in the legend and so one line for each, so in total 5 lines. Does that help?

Dalton_Ruer
Support
Support

Easy Breasy then

Your line chart Title would be: ='Line Chart for ' & GetFieldSelections(Product)

Your line for Expcted would be: Max(Expected)

Your 4 Name lines would be use set analysis to use only their name: Sum({<Name={'a'}>}Actual)

I modified some of the data so the lines aren't your numbers but this is what it looks like:

LineChartFor.png

 

Dwyane
Contributor II
Contributor II
Author

But then I would need a set analysis for every name? The names could change, apologies the table I provided was just a sample it could go up to 15-20 names and depending on the product that could change. Can I do the set analysis dynamically?

Dalton_Ruer
Support
Support

Sorry there is no way to automate the generation of 15-20 expressions.

That is where the TRELLIS will come in handy. It will iterate through all of the names you have for whatever product is selected. 

Dalton_Ruer_2-1619114528991.png