Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I'm trying to get a distinct count on the records between a range based on the [YearMonth] selected, this is the expression:
Count(DISTINCT {<YearMonth_Rep = {">=$(=min(YearMonth))"}, YearMonth_Rep = {"<=$(=max(YearMonth))"} >} ReportID )
YearMonth_Rep and YearMonth are numeric values in the form 201101, 201102 for january and february 2011 respectively.
If I use the MIN or MAX part only, the filter works as expected, however trying to get both sentences together doesn't work.
How should I change the sentence?
Or do you have another recomendation on how to achieve this?
Thanks in advance
Robert
Hi,
You'll want to put both conditions within the same {}. You only define the set for YearMonth_Rep at one place, something like:
sum( {$<Year = {“>1978<2004”}>} Sales )
So you should update your expression to:
Count(DISTINCT {<YearMonth_Rep = {">=$(=min(YearMonth))<=$(=max(YearMonth))"} >} ReportID )
Hi,
You'll want to put both conditions within the same {}. You only define the set for YearMonth_Rep at one place, something like:
sum( {$<Year = {“>1978<2004”}>} Sales )
So you should update your expression to:
Count(DISTINCT {<YearMonth_Rep = {">=$(=min(YearMonth))<=$(=max(YearMonth))"} >} ReportID )
Johannes, it works... thank you!