Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Hider Bars in accumulated combo chart with Last Year vs Fiscal Year comparison

Hello,
I’m trying to create an accumulated bar chart comparison with the Cost for Last Year.
I am using a combo chart and when looking at the YTD values it doesn’t stop at the last Period that has values.Accumulated.pngSo I’m trying to somehow hide the bars that do not have a new value.
I tried coloring them with ARGB and make them transparent which partly works, but unfortunately also hides last years values (the line).accumulatedARGB.pngI already found some threads, but they were based on qlikview and I could not make it work with the help I found regarding sense on the forum.acumuulatedcrossed.png

So everything crossed with black should not be visible, either through making it transparent or not showing up at all.
Can anyone help?

I tried to attach a qvf based on my bar chart, I hope I uploaded it correctly. You will have to select FY2019 to see the correct view with the missing values for bars from periode 4 on.

Thank you!

Labels (1)
3 Replies
Highlighted
Specialist III
Specialist III

Hi Bro

 

change your last year expression

rangesum( above( sum({< FY= {$(= max(FY-1))}, Period={"<=4"}>}Value),0,rowno()))

 

instead of 4 for dynamic lass as max(period) pass to variable

Channa
Highlighted
Contributor
Contributor

Hi Channa,

thanks! It's working if I put in the Period={"<=4"} manually, but I cannot get it to work with a variable. So when choosing another year, the last year cumulation will always stop at period 4.

I tried 

rangesum( above( sum({< FY= {$(= max(FY-1))}, Period={<= {$(=max(Period)) }>} Value),0,rowno()))

and a few other variations but it doesn't work.


Highlighted
Specialist III
Specialist III

ok bro just put

=max(Period)

this in text box and see if it is giving 4 or not

if not may be you need to change data type =max(num(Period))

 

Channa