Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

urgent help on Set Analysis

Hi,

I am writing below codes to get an expression (each month balance/first month balance. Here denominator is always constant i.e. first yr balance however, numerartor will change on balance specific to each month

With Min Yr:

((Sum({1<yymm = {'$(=Min(yymm))'}>} ((OPEN_BAL_AMT)))+Sum({1<yymm = {'$(=Min(yymm))'}>} ((CLOSE_BAL_AMT))))/2)

This code gives first month balance.

All Yrs:

(sum( {$<yymm = >} OPEN_BAL_AMT )+sum( {$<yymm = >} OPEN_BAL_AMT ))

This gives balance wrt to each month.

Now when I try to divide above two expressions, I am always getting first month balance and not other month balance.

Plz help.

Sunil

3 Replies
piotr_kierul
Partner - Contributor III
Partner - Contributor III

Hi!

I think you just need to add "Total" in first expression, then it will be not aggregated on months and it should work just fine:

((Sum( Total {1<yymm = {'$(=Min(yymm))'}>} ((OPEN_BAL_AMT)))+Sum(Total {1<yymm = {'$(=Min(yymm))'}>} ((CLOSE_BAL_AMT))))/2)

Not applicable
Author

This does not work. Is there some other way to establish it?

piotr_kierul
Partner - Contributor III
Partner - Contributor III

I'm pretty sure it should work, take a look at attached qvw.