Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Expert!
I have a pivot table with this simple expression:
if(isnull(GetFieldSelections(Año))and isnull(GetFieldSelections(Mes)),sum({<[Fecha Nro]={"$(='>=' & num(AddMonths($(vMaxFecha), -11)) & '<=' & num($(vMaxFecha)))"}>}Cantidad),
sum(Cantidad))
if the user do not select AÑO or MES, sum the last 12 months, if the user select año or month sum only the selection.
my problem is that if the user do not select anything, the pivot table crush and said me OUT OF MEMORY.
there is any problem in using this kind of function in sense? is happen the same if i use GETSELECTEDCOUNT(AÑO)
but if i use:
if(1=1,sum({<[Fecha Nro]={"$(='>=' & num(AddMonths($(vMaxFecha), -11)) & '<=' & num($(vMaxFecha)))"}>}Cantidad),
sum(Cantidad))
it works fine, evaluete 1=1 and do the correct sum
what could be?
i try it in qlikview and work great!!!
Fernando K.
What if you try this:
If(Len(Trim(GetFieldSelections(Año))) = 0 and Len(Trim(GetFieldSelections(Mes))) = 0,
Sum({<[Fecha Nro]={"$(='>=' & num(AddMonths($(vMaxFecha), -11)) & '<=' & num($(vMaxFecha)))"}>}Cantidad),
Sum(Cantidad))
Hi sunny, the same result, it seems to be the getfieldselections() not work
could be?
!
I don't see why GetFieldSelections() won't work. I guess create a KPI object with GetFieldSelections(Ano) to see if it show anything (make sure you set custom format to see the text values, else KPI object might just show -.
Also try GetSelectedCount(Ano) may be that one works, if it does, you can use that.
Also Try to check what does this give you:
If(Len(Trim(GetFieldSelections(Año))) = 0 and Len(Trim(GetFieldSelections(Mes))) = 0, 1, 2)
All these are ways I can think of troubleshooting the issue.
Keep us posted
Get field selection is a chart function in Qliksense. It should work.