Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ABrightmore
New Contributor

Cummulative Line Graph with Multiple Measures

Good Morning All,

I am trying to create a Line Graph which shows multiple cumulative lines for different measures.

In the attached example, I have two contracts each with an allocated amount of hours, I would like to display the cumulative hours for each contract on one single graph.

From some initial research into this, I have created the graph which has the Dimensions Group as 'Date.autoCalendar.Date', the Dimensions Line is 'Contract' and the Measure Height is 'Aggr(RangeSum(Above(Sum(Hours), 0, RowNo())), [Date.autoCalendar.Date], Contract)'.

This doesn't give me what I want, and I don't understand why, as the formula has appeared to work for other examples!

Any help on this would be greatly appreciated.

I am using Qlik Sense Desktop June 2019 (qliksensedesktop:13.32.2).

Thank you in advance.

Andy. 

1 Solution

Accepted Solutions
Highlighted
Yoshidaqlik
New Contributor III

Re: Cummulative Line Graph with Multiple Measures

Hi

in this case I think the classification was just missing, because it is using dimension to create several lines

this way will solve:

 

sum(
	aggr(
    	rangesum(
        	above(
            	sum(Hours),
                0,
                RowNo()
            )
        )
        ,(Contract,(TEXT,ASCENDING)), ([Date.autoCalendar.Date],(NUMERIC,ASCENDING))
    )
)

 Regards

YoshidaQlik https://www.youtube.com/channel/UC1I9P8MqCZEhB6Nw3FdSqng
2 Replies
Highlighted
Yoshidaqlik
New Contributor III

Re: Cummulative Line Graph with Multiple Measures

Hi

in this case I think the classification was just missing, because it is using dimension to create several lines

this way will solve:

 

sum(
	aggr(
    	rangesum(
        	above(
            	sum(Hours),
                0,
                RowNo()
            )
        )
        ,(Contract,(TEXT,ASCENDING)), ([Date.autoCalendar.Date],(NUMERIC,ASCENDING))
    )
)

 Regards

YoshidaQlik https://www.youtube.com/channel/UC1I9P8MqCZEhB6Nw3FdSqng
ABrightmore
New Contributor

Re: Cummulative Line Graph with Multiple Measures

Hi Yoshi,

This worked perfectly.

Thank you!