Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using the following expression on one of my dimension in table, and it is throwing an error - Invalid dimension.
Formulae:
if(GetSelectedCount(COUNTRY) = 0,
only({$<COUNTRY = {'England'}>}COUNTRY),
COUNTRY)
Please correct me if anything implemented wrongly
Thanks in advance
Try
=Aggr(If(GetSelectedCount(COUNTRY), COUNTRY, Only({<COUNTRY = {'England'}>} COUNTRY)), COUNTRY)
and check the dimension option 'Suppress when value is null'
did you chkd country dimension values in listbox?
Yes chanty.
I have England, USA and SEA as values in Country field.
If i use if condition as below
if(Country = 'England',Country) - Working fine, but restricting to England only.
My purpose is,
if I do not select any country by default it should show England and upon other selections it should the respective country details
Thanks
try below
if(GetSelectedCount(COUNTRY) = 0,
only({<COUNTRY = {'England'}>}COUNTRY),
COUNTRY)
remove dollor
Tried the same as well, but showing the same error.
Is there any other way (Logic) to achieve this .
Thanks for your quick response chanty
Try
=Aggr(If(GetSelectedCount(COUNTRY), COUNTRY, Only({<COUNTRY = {'England'}>} COUNTRY)), COUNTRY)
and check the dimension option 'Suppress when value is null'
Vinay,
Try to add dimension as below:
if(GetSelectedCount(COUNTRY) = 0,'England',COUNTRY)
Same thing add in your expression also; Let say you want to do sum(xyz) then
if(GetSelectedCount(COUNTRY) = 0, sum({<COUNTRY={'England'}>}xyz) , sum(xyz) )
Hope this will resolve your problem!
try wit Aggr
as jontathan
Aggr(if(GetSelectedCount(COUNTRY) = 0,
only({<COUNTRY = {'England'}>}COUNTRY)),
COUNTRY)
Thank you so much jonathan - its working.
Can I have a small background why its working with aggregation only??
thanks
or else
=IF(GetSelectedCount(COUNTRY) = 0, COUNTRY, Aggr(
only({<COUNTRY = {'England'}>}COUNTRY)),
COUNTRY))}>} COUNTRY), COUNTRY))