Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ishanbansal1204
Contributor III
Contributor III

Clarification on the query

Hi Experts ,

I have a query which should fetch results based on certain condition for the given year.

IF(STATUS = 'Closed',COUNT(DISTINCT{<YR={'$(=max(YR))'}>}ID))

But this query is not fetching any result. can you please help me fix the query.

Thanks

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Is STATUS a field? Are you performing this in a table with dimensions or in a dimensionless context (like a text box)?

If there is more than one possible value for STATUS, it will be evaluated as null. Perhaps you need

COUNT({<STATUS = {'Closed'}, YR={'$(=max(YR))'}>} DISTINCT ID))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Is STATUS a field? Are you performing this in a table with dimensions or in a dimensionless context (like a text box)?

If there is more than one possible value for STATUS, it will be evaluated as null. Perhaps you need

COUNT({<STATUS = {'Closed'}, YR={'$(=max(YR))'}>} DISTINCT ID))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
poojashribanger
Creator II
Creator II

Hi,

please use double quote

IF(Division ='TELECOM',

COUNT(DISTINCT{<Year={"$(=max(Year))"}>}IBG))

ishanbansal1204
Contributor III
Contributor III
Author

Thank you Jonathan.

ishanbansal1204
Contributor III
Contributor III
Author

Thank you Poojashri