Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
dreweezy
Contributor

creating multiple lines using values in a dimension field

I have created a line chart manually by creating lines using set expressions. Picture below.capture123.PNG

The lines represent many different departments and their respective costs within the company.

Example - expression to create each line:

Sum({<DEPT = {"HR"}>} COST)

Sum({<DEPT = {"ACCOUTING"}>} COST)

Sum({<DEPT = {"IT"}>} COST) 

....

Is there a way to add another dimension so that Qlik can take care of this for me? I already have YEAR as a dimension to show a trend but would like qlik to auto generate lines based on values within my DEPARTMENT dimension. This way users can slice and dice the data. When I manually create these lines for DEPARTMENT COST, I cannot drill down/across to my other charts within the dashboard.

1 Solution

Accepted Solutions
jwjackso
Valued Contributor

Re: creating multiple lines using values in a dimension field

Why not have both year and department in the dimension and cost as the measure.  Put year before department and year should be on the x-axis and department should be on the legend.

2 Replies
jwjackso
Valued Contributor

Re: creating multiple lines using values in a dimension field

Why not have both year and department in the dimension and cost as the measure.  Put year before department and year should be on the x-axis and department should be on the legend.

dreweezy
Contributor

Re: creating multiple lines using values in a dimension field

Thanks for refreshing my brain seriously.. the solution was right in front of me yet I wanted to do a huge loop around :smileyfrustrated:.