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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

different expression for different dimension and month

Hi,

I have different groups in a table as dimension. and in my expression i sum points. But for one group i want to sum points*0.7 if the point was registred any month exept june july or august. Otherwise it's jus sum(points).

Who do i write this in my expression to get i to work.

It's the month part i'm having problem with. This works fine:

if(Team='groupX', avg(aggr(count({$<points={'>0'}>} distinct person), date, group))*0.7,

avg(aggr(count({$<points={'>0'}>} distinct person), date, group))

)

//A.

4 Replies
Not applicable
Author

Have you tried something like this:

if(Team='groupX' AND Month <> 'June' AND Month <> 'July' AND Month <> 'August', avg(aggr(count({$<points={'>0'}>} distinct person), date, group))*0.7,

avg(aggr(count({$<points={'>0'}>} distinct person), date, group))

)

Anonymous
Not applicable
Author

no didn't work. still got the same result as the above one. despite different month selections

rrsrini2907
Creator
Creator

Hi,

Could you upload sample.

Regards,

Srini.

Anonymous
Not applicable
Author

I's woking when a chose one of these special months but if a pick a period between may and oktober the number are the same as the expression i described that worked.