Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Actual vs Budget Conditional Amount

Hello,

I have the following table:

(Note that the SOURCE could be ACTUAL or BUDGET)

YEARPERIODTYPESOURCEAMOUNT
2013201307INCOMEACTUAL2.454
2013201308INCOMEACTUAL2.063
2013201309INCOMEACTUAL2.072
2013201310INCOMEACTUAL2.049
2013201311INCOMEACTUAL2.092
2013201312INCOMEACTUAL2.685
2014201401INCOMEACTUAL2.060
2014201402INCOMEACTUAL2.095
2014201403INCOMEACTUAL2.342
2014201404INCOMEACTUAL2.452
2014201405INCOMEACTUAL2.509
2014201406INCOMEACTUAL2.380
2014201407INCOMEACTUAL2.933
2014201408INCOMEACTUAL2.670
2014201409INCOMEACTUAL2.710
2014201410INCOMEACTUAL2.849
2014201411INCOMEACTUAL2.645
2014201412INCOMEACTUAL4.148
2015201501INCOMEACTUAL3.361
2015201502INCOMEACTUAL2.719
2015201503INCOMEACTUAL3.856
2015201504INCOMEACTUAL3.233
2015201505INCOMEACTUAL3.955
2015201506INCOMEACTUAL4.042
2015201507INCOMEACTUAL4.697
2015201508INCOMEACTUAL4.268
2015201509INCOMEACTUAL3.448
2015201510INCOMEACTUAL3.826
2015201511INCOMEACTUAL3.486
2015201512INCOMEACTUAL6.313
2016201601INCOMEACTUAL5.046
2016201602INCOMEACTUAL4.051
2016201603INCOMEACTUAL4.288
2016201604INCOMEACTUAL4.554
2016201605INCOMEACTUAL5.163
2016201606INCOMEACTUAL5.550
2016201607INCOMEACTUAL6.475
2016201608INCOMEACTUAL5.174
2016201609INCOMEACTUAL4.732
2016201610INCOMEACTUAL4.946
2016201611INCOMEACTUAL5.017
2016201612INCOMEACTUAL6.879
2017201701INCOMEACTUAL4.957
2017201702INCOMEACTUAL5.306
2017201703INCOMEACTUAL5.715
2017201704INCOMEACTUAL6.656
2017201705INCOMEACTUAL6.366
2017201706INCOMEACTUAL6.432
2017201707INCOMEBUDGET8.051
2017201707INCOMEACTUAL8.161
2017201708INCOMEBUDGET6.244
2017201708INCOMEACTUAL6.595
2017201709INCOMEBUDGET5.542
2017201709INCOMEACTUAL3.915
2017201710INCOMEBUDGET6.087
2017201711INCOMEBUDGET5.943
2017201712INCOMEBUDGET7.890
2018201801INCOMEBUDGET5.899
2018201802INCOMEBUDGET6.056
2018201803INCOMEBUDGET6.832
2018201804INCOMEBUDGET6.608
2018201805INCOMEBUDGET6.588
2018201806INCOMEBUDGET6.512

What I need is to create a bar chat with a drill down dimension with YEAR and PERIOD like this:

1.PNG

I should consider, from 201708 (last month) and previous periods with AMOUNT for SOURCE = ACTUAL.

For example: 201307, 201308, 201309, ..., 201706, 201707, 201708 should use only the ACTUAL value.

From 201709 (current month in progress) and later months, I use AMOUNT for SOURCE = BUDGET.

So if I filter YEAR = 2017, then I would need something like this (blue is ACTUAL / grey is BUDGET😞

2.PNG

These are the values I need to use to build the chart for YEAR = 2017:

YEARPERIODTYPESOURCEAMOUNT
2017201701INCOMEACTUAL4.957
2017201702INCOMEACTUAL5.306
2017201703INCOMEACTUAL5.715
2017201704INCOMEACTUAL6.656
2017201705INCOMEACTUAL6.366
2017201706INCOMEACTUAL6.432
2017201707INCOMEACTUAL8.161
2017201708INCOMEACTUAL6.595
2017201709INCOMEBUDGET5.542
2017201710INCOMEBUDGET6.087
2017201711INCOMEBUDGET5.943
2017201712INCOMEBUDGET7.890

And YEAR = 2018 would be all with SOURCE = BUDGET by now.

I attach the QVW. Do you know how could I do that?

Thank you!

4 Replies
dinuwanbr
Creator III
Creator III

Hi,

PFA and change the rgb value in background color in the expression to grey as u want (unfortunately I put violet)

Rgds,

Tharindu

microwin88x
Creator III
Creator III
Author

Hello,

I'm afraid I don't get the desired output. Because if you check the table for YEAR = 2017:

YEARPERIODTYPESOURCEAMOUNT
2017201701INCOMEACTUAL4.957
2017201702INCOMEACTUAL5.306
2017201703INCOMEACTUAL5.715
2017201704INCOMEACTUAL6.656
2017201705INCOMEACTUAL6.366
2017201706INCOMEACTUAL6.432
2017201707INCOMEACTUAL8.161
2017201708INCOMEACTUAL6.595
2017201709INCOMEBUDGET5.542
2017201710INCOMEBUDGET6.087
2017201711INCOMEBUDGET5.943
2017201712INCOMEBUDGET7.890

2.PNG

On the other side, 201709 is bringing ACTUAL value and not BUDGET:

1.PNG

dinuwanbr
Creator III
Creator III

Hi Macro,

Check this.

I think it's bit tricky dealing with both year and month in the same graph since we can't use aggr() for PERIOD in Year dimension. Still I'm working on that.

Rgds,

Tharindu

antoniotiman
Master III
Master III

Hi,

see Attachment.

Regards,

Antonio.