Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone, I hope you can help me.
I created a filter using this field:
=[VE.Order Date.autoCalendar.Year]
in the "Budget" measure I inserted this expression:
if(GetFieldSelections([VE.Order Date.autoCalendar.Year])='2016', 1000, 1160)
so if I select 2016 I would like to see the value of 1000 under the Budget label, but this does not happen.
Where am I doing wrong?
I attach an image for greater clarity
Thank you
I've done it!
I created a calculated column in the table
OrderYear = year (OrderDate)
and in this way it worked, I do not know what problems it had with the other mode.
Thank you all for your help 🙂
Hi,
Is Year stored as a string or a number? Have you tried the following without the apostrophes (single quotes)?
if(GetFieldSelections([VE.Order Date.autoCalendar.Year])=2016, 1000, 1160)
I've just created a new app and added manual data with just one field (Year) and three values 2015,2016 and 2017. I then added a filterpanel containing Year as dimension and a KPI with the definition:
if(GetFieldSelections([VE.Order Date.autoCalendar.Year])='2016', 1000, 1160)
This works fine whether I use single quotes or omit the quotes. Could you please post your app? In the meantime, is the year field you are using linked with any other data table?
I can not post the app, but I can say that the sales table is linked to others but not using the year field.
Ok, as per the suggestion above. Create a text box or add a column to an existing table with the definition GetFieldSelections([VE.Order Date.autoCalendar.Year]) , select Year 2016 and see what the result of this expression is.
I've done it!
I created a calculated column in the table
OrderYear = year (OrderDate)
and in this way it worked, I do not know what problems it had with the other mode.
Thank you all for your help 🙂