Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I have a trouble using only function in a chart expression. My dimension is dimension1, and my expression is like:
=sum({<flag={'1'}, dimension2={'$=(Only(dimension1))'}>} Sales)
dimension1 and dimension2 are same format, result of MonthName function in script.
I tried with ' and " and without them, but still not working.
I'd appreciate any help. Thanks.
Marc.
This should work...
=SUM(IF(Country = CountryField and Flag = 1 and dimension1 = dimension2, Sales))
Manish, this expression is exactly what I have...
Manish,
If the values in the isolated tables would be Distinct, it works fine. Anyway, I give up. I'll try from another point of view.
Thanks for your time.
Marc.
Busy with my project... so can't spend much time on this... Can try on coming weekend...
Only() will return a value when the field has just one selected value.
If no values are selected or more than one value is selected then Only() will return Null.
It may be better to use Max() or Maxstring() instead of Only(), as the max expressions will always return a value whether one value is selected, or multiple values are selected, or no values are selected.