Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
kdstrin1
Contributor II
Contributor II

Show/Hide Chart Series Based on Time

I am trying to build a chart that would show a variance between realized volumes and budgeted volumes for the months transpired in the year. And for the remaining months, I want to see the variance between budget and actual on a year-to-date basis split evenly across the remaining months.  Using a calendar basis for current year, it would have data in the following manner;

Jan 2025 - May 2025:  charted cumulative monthly variance to budget  (does not display data in June - December)

June 2025 - December 2025:  charted total variance of actual to budget split into even monthly distribution (does not display January - May)

Attached is a screenshot with a visual. However the future months budget portion is right now just pulling in monthly budget numbers. When I attempt to set up the calculation as described above, it changes to the second screenshot attached.

Are there expressions to limit the data display to select months when the data is from other months? Any assistance is greatly appreciated. Please let me know if further information is needed.

Labels (2)
1 Reply
rafaelencinas
Partner - Creator II
Partner - Creator II

Hi !!

In this case, you can create a Flags in your Data Model

 

Field 1

If ( YearAndCurrentMonth <= YearAndCurrentMonthFieldDateFromRealized = 1 , 0) as FieldRealized 

 

Field 2

If ( YearAndCurrentMonth <= YearAndCurrentMonthFieldDateFromBudged = 0 , 1) as FieldBudget 

 

In your Formula:

( Realized + Budget ) as Fieldvalue 

 

In your SetAnalysis in Buget 

Sum ( {< FieldBudget = {1} >  FieldValueBudget } 

 

According with this Flag, if the FieldMonth From Budget is minor then Current Month will result Zero, if greater then will result the value.

 

 

 

 

 

Senior Qlik Architect
Cobra, Stallone, "You're a problem and I'm the solution"