Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
elane1314
Contributor
Contributor

Counting overspent budgets

Super new to Qlik Sense, please help!

 

I want to have a KPI show the number of budgets that have been overspent. I have a field called "Budget Amount" that is associated with each budget and represents how much is budgeted. Then, I have another data set that is like a transaction journal. Each transaction has an amount and an associated budget. Therefore, to see how many budgets have been overspent, I need to check when sum(amount) related to this budget > budget amount. Pretty sure this is some sort of set analysis just not sure how to set it up.

 

Thanks for any help!

Labels (2)
3 Replies
vishsaggi
Champion III
Champion III

Can you share some sample data to look into. However, you can create a flag in your Transaction table like
LOAD *,
'Tran' AS TranFlag
FROm yourtrantable;

Use like
= IF(Sum({<TranFlag = {'Tran'} >}Amount) > BudgetAmount, 1, 0)
something like this. If you can share some sample with expected output it would be more easier.
elane1314
Contributor
Contributor
Author

Unfortunately, I can't share sample data, it is for work and sensitive. The transaction table could have lots of different transactions that apply to one budget. It's like a ledger of all transactions made. Then there is another table that lists every "fund" that is available and how much is allotted for it, so it doesn't change.

I could be wrong, but I don't know if that would work. I have very little experience with the set analysis, but to me it looks like it would evaluate the number of transactions, not the amount. Maybe if you could put into words what that expression is doing, it might make more sense.

vishsaggi
Champion III
Champion III

Can you create some sample out of your original data and share here with your expected output please if possible?