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

What is wrong with this expression?

Hey,

What's wrong with this?

=sum({$<Fiscal_Quarter={$(#=(maxstring(Fiscal_Quarter)))}>} Sales)

If i try this every works

=sum({$<Fiscal_Year={$(#=(maxstring(Fiscal_Year)))}>} Sales)

My dimension for both expresions is Fiscal_Quarter

tnx



5 Replies
villafuerte
Partner Ambassador
Partner Ambassador

Hi Timmy,

Maybe it doesn't work because you're trying to get a number with the "#="

What's the format of Fiscal_Quarter?

Not applicable

What do you mean by 'wrong'?

timmy
Partner - Contributor III
Partner - Contributor III
Author

Your correct!

how can i perform this?

=sum({$<Fiscal_Quarter={'Q' & ' ' & {$(=right(maxstring(Fiscal_Quarter),2))}>} Sales)



villafuerte
Partner Ambassador
Partner Ambassador

Hi Timmy,

Can you upload an example file so we can see the formats and selection you want to display?

Cheers

villafuerte
Partner Ambassador
Partner Ambassador

The code you wrote had more or less the correct structure, but the string concatenation ( Q & '' % ...) is also an operation, so you need to evaluate it before the comparison in the set analysis.

However it would be easier to show you with a mock file.

Cheers