Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a line chart with the dimension "Accounting Period", which has data in the "YYYY-MM" format. For the line, I am using Status", which is "Level 1" or "Level 2". The measure, height, is the count of "Status". I load in the full data set, 9 columns, and then I want to do all my aggregation within Qlik Sense.
I want to create a "Total" line which sums the statuses together. I looked around at other solutions, but I was unable to implement them due to them adding an additional measure.
I am able to get it in Pivot Table below, so I would really like to graph the Pivot table with the "Totals".
Any assistance in getting a "Total" line to show up in the line chart would be greatly appreciated!
Create inline table like below
Load * Inline [
Dim
1
2 ];
In line chart use below dimension
1) Period
2) Pick(Dim,Status,'Total')
expression you can keep the same
Looks like @sunny_talwar 's solution in the post worked. However, I am unsure how it worked like the OP of that question.
https://community.qlik.com/t5/New-to-Qlik-Sense/line-chart-with-total/td-p/1458005
I am unsure of how the LOAD * INLINE and the PICK(...) in the dimension resolves this.
Create inline table like below
Load * Inline [
Dim
1
2 ];
In line chart use below dimension
1) Period
2) Pick(Dim,Status,'Total')
expression you can keep the same
Thanks @Kushal_Chawda !
Is there a way for me to rename the fields in the "LEGEND" from "Level 1" and "Level 2", to custom values? I want to rename them to be more descriptive.
there are many ways of doing it
1) In load statement put pick(match(condition
pick(match(Status,'Level 1','Level 2'),'Description for level 1','Description for level 2') as Status_Description
2) Create inline table
load * inline [
Status, Status_Description
Level 1, Description 1
Level 2, Description 2 ]
Now you can call this new description field in chart
Thank you very much! You have solved both my problems for this app :). Thanks for answering the 2nd one even though it was out of scope of the original topic. I wish I could accept both as a solution.
No problem. Glad that I was able to help
Thanks a lot. This worked for me.
We had a line chart with 2 dimension and a measure. Need to add TOTAL line. It worked like a Charm.
One more requirement, for the TOTAL line alone, can we change the thickness?
The Dim value will be 2, but in the styling option of line chart, there is no option for any expression.