Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Yogita
Contributor
Contributor

Conditional Sum with Distinct

Hello,

 

I am trying to sum no. of open positions based on two conditions: 1. Year  and 2. for distinct job req id. The below expression is showing error. Can you please help be get it correct:

=sum({<[JobReqCreateYear]={$(vMaxReqYear)} DISTINCT [Job Req ID]>[No. of Openings])

 

Thanks

Yogita

Labels (1)
3 Replies
pradosh_thakur
Master II
Master II

you might want to use

[Job Req ID]  as the dimension

 

and

=sum({<[JobReqCreateYear]={"$(vMaxReqYear)"}>}[No. of Openings])

 

as your measure

 

Learning never stops.
Yogita
Contributor
Contributor
Author

Thanks for your response. I am using this expression in a Text box. Not sure how to define dimensions in table box. 

Can't we make it a 2 conditions Sum expression ?

pradosh_thakur
Master II
Master II

We can use two condition for sure , but Your second condition is n't really a condition. it is more or less feels like a dimension. You can use a straight table for this I guess. If this not your requirement, you can explain it with a small example.

 

-Pradosh

Learning never stops.