This space is for everyone to ask questions related to the Community Platform. It's a space for us to get to know each other and have some fun! Come in and gather around the Water Cooler!
Hi,
My requirement is to nullify the selection in if statement.
I have year as a filter and I want to nullify its value even if particular year is selected and this has to be done in an if statement.
My expression is :
if(product='Cards',sum({<year=>}sales),
if(product='MF',sum({<year=>}gross_sales))
If I am selecting year =2019, I need to get all years of data but I am getting only 2019 data. If I use sum({<year=>}sales) without using If its is working as expected.
Please suggest.
Thanks
maybe this:
=sum( {<year=>} if( product='Cards', sales,
if( product='MF', gross_sales )
)
)
maybe this:
=sum( {<year=>} if( product='Cards', sales,
if( product='MF', gross_sales )
)
)
It works but I have few more fields in the set analysis which are different in both the cases.
So in actual it is
=if( product='Cards', sum({<country='China', code='106',forecast=$(vmax_cycle)>}sales),
if( product='MF', sum({<country='SGH', code='160',forecast=$(vmax_cycle)>}gross_sales )
)
)
Please suggest