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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

comparing different dimensions member values

Hello,
One of the calculations that I am working on requires an evaluation of the yearly average value at the month level.  For example, If January is greater than the yearly average then take the yearly average value otherwise, use the current month value. How would I do this?  I tried to evaluate it like this:
=
IF (

avg(
aggr(
DISTINCT
(
(
$(varAvgDailyCensus) * $(varPaidHourPerStat) *$(varDaysInMonth) ) /
(2080/365*
$(varDaysInMonth) )
),
FORECAST_LEVEL_DESC, SCENARIO_DESC, MONTH,DEPT_NAME
)
)

>

avg(
aggr(
DISTINCT
(
(
$(varAvgDailyCensus) * $(varPaidHourPerStat) *$(varDaysInMonth) ) /
(2080/365*
$(varDaysInMonth) )
),
FORECAST_LEVEL_DESC, SCENARIO_DESC,YEAR,DEPT_NAME
)
)

,1,0
)
If I break each of these statements up, they work...however, if I try to evaluate them in an if statement, it doesnt work.
Qlikview syntax is relatively new to me...if this was SSAS, I would be done really quick!
Thanks,
Joe
1 Reply
Not applicable
Author

Any takers?