Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Yogita
New 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
Honored Contributor II

Re: Conditional Sum with Distinct

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
New Contributor

Re: Conditional Sum with Distinct

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
Honored Contributor II

Re: Conditional Sum with Distinct

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.