What is the proper syntax for If conditional statement in data calculation

I have a list view. I would like a column to display different fields depending on a condition. For instance, If dashboardid = 'Iplus' then YTD_GOAL_% else YTD_CHANGE_%.

Can this be done? If so, what is the syntax? I'm looking at view properties - data calcuation option

 

CalcScreen.jpg

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    John Lafauce

    Hi Art,

    We examined your issue and made some changes to the syntax you were using. What worked for us was taking out the percent signs from the field name and the calculation, using the following syntax:

    IIF(dashboardID= 'Prudential', YTD_GOAL, YTD_CHANGE)


    Btw, I used Prudential as my field value as an example, whereas you used IPlus. It should still work the same.

    Results:

    - When we tapped on the Prudential record from the list in the app, the calc showed the YTD_GOAL value.
    - When we tapped on any other record that was not Prudential, the calc showed the YTD_CHANGE value.

    Here is a screen grab of the test screen including the calculation.

    IIF_calc_on_screen.png


    Thanks,

    John

Please sign in to leave a comment.
Powered by Zendesk