Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mkb_Qlik
Contributor III
Contributor III

Qlik Above function in Bar chart not working

Hi,

I have a table like below, 

muthukumarbalu91_2-1596458768415.png

 

Each period holds YTD values (except 201901 & 202001). i wish to find out monthly figures for each period.

The same has been successfully found by using below expression .

IF((LEFT(Period,4) <> Above(LEFT(Period,4))),(SUM({<TYPE={'REEL'}>}YTD_Value)),
(SUM({<TYPE={'REEL'}>}YTD_Value)- Above(SUM({<TYPE={'REEL'}>}YTD_Value))))

Now all i need is adding additional country dimension to show  same in BAR Chart.

But when i reuse the same expression its not showing monthly value instead it shows YTD Value If i not consider period column.

 

muthukumarbalu91_4-1596459226228.png

 

Any suggestion how to fix this in Bar chart to show cumulative  sum in bar chart country wise.

1 Solution

Accepted Solutions
mkb_Qlik
Contributor III
Contributor III
Author

Hi @sunny_talwar 

 

Thank you very much for your assistance.

 

I have fixed this case from back end scripting.

Thank You!

 

 

View solution in original post

5 Replies
sunny_talwar

Try this

Aggr(

  If(Left(Period, 4) <> Above(Left(Period, 4)),
    Sum({<TYPE = {'REEL'}>} YTD_Value),
    Sum({<TYPE = {'REEL'}>} YTD_Value) - Above(Sum({<TYPE = {'REEL'}>} YTD_Value))
  )

, COUNTRY_CODE, (Period, (NUMERIC)))
mkb_Qlik
Contributor III
Contributor III
Author

Hi @sunny_talwar ,

Thanks for your assistance.

 

However given expression works well when i consider period dimension in Bar Chart. Any other suggestions to show the aggregation at Country Code level.

 

Thanks in advance!

sunny_talwar

Try this may be

Sum(Aggr(

  If(Left(Period, 4) <> Above(Left(Period, 4)),
    Sum({<TYPE = {'REEL'}>} YTD_Value),
    Sum({<TYPE = {'REEL'}>} YTD_Value) - Above(Sum({<TYPE = {'REEL'}>} YTD_Value))
  )

, COUNTRY_CODE, (Period, (NUMERIC))))
mkb_Qlik
Contributor III
Contributor III
Author

Hi @sunny_talwar 

 

Thank you very much for your assistance.

 

I have fixed this case from back end scripting.

Thank You!

 

 

sunny_talwar

Awesome