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

Sum Budget To The Current Month

I have two unrelated views one has amounts the other has budgets.

- The Budget view has Budget Dates i.e 1st date of the month for the current year and Budget Amounts for that month.

- The Amounts view has Amounts and Captured Dates for the respective amounts.

I wish to make a gauge of the two; my struggle is summing the Budget from the start of the Year to the Current Month. 

How can I go about this?

Labels (3)
5 Replies
Kushal_Chawda

may be below

-sum({<BudgetDate ={">=$(=date(yearstart(max(BudgetDate))))<=$(=date(max(BudgetDate)))"}>}BudgetAmount)

j0nimost1
Contributor II
Contributor II
Author

This sum returns null result. 

AbhijitBansode
Specialist
Specialist

I understand you have data until the latest month. Why can't assign a numeric flag to each year in load script. 

1 for the latest, 2 for the last year and so on ( you can achieve this using various ways in load script)

2020 - 1 

2019 -2

and so on

 

and finally in front end, use the expression below to get data of latest year:

Sum({<YearFlag ={1}>} BudgetAmount)

 

Qlikgards,

AB

j0nimost1
Contributor II
Contributor II
Author

I am summing budget to the current month. The Budget view has all monthly budgets for the current year. 

j0nimost1
Contributor II
Contributor II
Author

@Kushal_Chawda can you fix the solution you gave?