Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

Whole Sum in one Barchart

Hi Folks,

i got a question, my datatable does look like:

Year, Budget,  Expenditure

2018, 5, 4

2019, 15, 8

2020, 20, 12

my question (expected output):  if i create the barchart and use as dimension the field: YEAR and 2 expressions: Budget and Expenditure. i would like to know whether is that possible to create with the help of set expression the following expression:

i want to see as normal my budget distributed for each year, and and expenditure as whole sum only for year: 2020 (for instance)

Year, Budget,  Expenditure

2018, 5, -

2019, 15, 

2020, 20, 20 (4+8+12) i want to show this amount within my barchart only for year 2020

Does anybody have any idea how to resolve this issue?

Thanks a lot

Bek

 

Labels (1)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

With Year as your Dimension, try this for your Expenditure expression,:

=if(Year=Max(Total Year),sum(Total Expenditure))

You may need to adjust, depending on other dimesions and additional set analysis criteria.

This could also be approached via Rangesum in the chart, depending on what functionality you are looking for.

 

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

With Year as your Dimension, try this for your Expenditure expression,:

=if(Year=Max(Total Year),sum(Total Expenditure))

You may need to adjust, depending on other dimesions and additional set analysis criteria.

This could also be approached via Rangesum in the chart, depending on what functionality you are looking for.

 

beck_bakytbek
Master
Master
Author

Hi GaryGiles thanks a lot for your time and help. You made my day