Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have this value list in my pivot.
= ValueList('Range', 'YTD', 'Previous YTD')
There are a few expression. I only want to show certain ones depending on the value in the value list.
In other words I want to show all expressions that are YTD related to show under YTD and the previous year's expressions under 'Previous YTD' and so on.
On the expression tab I have conditional enabled on a expression and this is my condition
if(ValueList('Range', 'YTD', 'Previous YTD')='Previous YTD',1,0)
It hides the expression on all of the values and if I change the 1 and 0 around it shows it on all of the values.
I don't understand why its not working.
created another expression with if(ValueList('Range', 'YTD', 'Previous YTD')='Previous YTD',1,0) just to see what value it gives me and it does Range = 0, Previous YTD = 1 and YTD = 0. So it does work!!!
Thanks
Theo
Hi Theo, conditional expression enables or disables the expression for all the table, if you want certains cells to not calculate the results you should put the conditions inside the expression, ie:
if(ValueList('Range', 'YTD', 'Previous YTD')='Previous YTD', Sum([Sales Previous YTD]),
if(ValueList('Range', 'YTD', 'Previous YTD')='Range', Sum([Sales Range]),
if(ValueList('Range', 'YTD', 'Previous YTD')='YTD', Sum([Sales YTD]))))
Hope this helps.
Thanks Ruben! That worked, not sure why I got stuck in my thinking!