9 Replies Latest reply: Aug 5, 2015 2:03 PM by kushal chawda

# conditional Set analysis

Hi Everyone,

I'm fetching count(Distinct(Awards) if name='John'.   count({\$<Name={'John'}>} DISTINCT Awards)

I wanna restrict the year to 2015.

Can someone throw some limelight.

• ###### Re: conditional Set analysis

Try something like this:

count({\$<Name={'John'}, Year = {2015}>} DISTINCT Awards)

• ###### Re: conditional Set analysis

Thanq Sinan.

• ###### Re: conditional Set analysis

try,

count({\$<Name={'John'}, Year ={"\$(=max(Year))"}>} DISTINCT Awards)

• ###### Re: conditional Set analysis

Thanq Kush.

both of the solutions worked

• ###### Re: conditional Set analysis

Hi,

I wanna calculate the below expression using set analysis for year 2015 like

(Sum([Units])/Count(Distinct([route Number])))

If (Year=2015, (Sum([Units])/Count(Distinct([routeNumber]))))

Can you help me in the syntax pls.

• ###### Re: conditional Set analysis

Try this

Sum({<Year ={"\$(=max(Year))"}>}[Units])/Count(Distinct{<Year ={"\$(=max(Year))"}>}[routeNumber])

• ###### Re: conditional Set analysis

Thanq Kush.

• ###### Re: conditional Set analysis

Welcome Mark

• ###### Re: conditional Set analysis

Sum({<Year={2015}>}[Units])/Count({<Year={2015}>}Distinct([route Number]))