Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table that looks like this
Month | Product | Expected | Actual | Name |
1 | abc | 10% | 3% | a |
1 | abc | 10% | 4% | b |
1 | abc | 10% | 1% | c |
1 | abc | 10% | 4% | d |
2 | abc | 20% | 7% | a |
2 | abc | 20% | 9% | b |
2 | abc | 20% | 14% | c |
2 | abc | 20% | 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!
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...
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?
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:
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?
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.