Hi all, I created dynamic field ‘Tye’ in parameter, while creating calculated filed i am getting syntax error as shown in image. I tried but i couldn’t able to figure the error. can any one help me in identifying the same.
HI @sbaskax - Can you please try to use below forumla.
ifelse(${Tye} = [“Week”], {Week}, ${Tye} = [“Month”], {month}, {Qtr})
Also please check the parameter name and field values ensure they are correct in terms of case sensitive. If you are still facing issue. Please provide more details on the parameter as well.
Tagging QuickSight experts
@Max @apjvinod @thomask @Thomas @Kristin @David_Wong @Biswajit_1993 @Bhasi_Mehta @Tatyana_Yakushev
Regards - San
Hi @sbaskax, Now it is fine or you are still having some issues.
No Biswajit, Still i am getting error
Hi @sbaskax - Can you please give a screenshot of field details?
Regards -San
Hi @sbaskax do you have all the three column like Year, Month, Week in your dataset?
Yes, i have week, month & Qtr (calculated field)
Hi @sbaskax - Thanks. Can you please try the below formula.
ifelse(${Tye} = [“Week”], {week}, ${Tye} = [“Month”], {month}, {Qtr})
Regards - San
Hi @sbaskax - Please copy the formula to notepad and replace double quote present in formula with actual double quote as this copy paste from the blog is not actual double quotes.
Please try this once.
Regards - San
Hi,
month and week are integers and Qtr is a String.
Every result of an ifelse function needs to be of the same datatype.
Thanks @thomask , really good observation , that is why we called you “Expert”. I am trying multiple things and miss this point. my bad
Regards - San
Thank you Thomask, it works after changing the datatype of Qtr
Thank you sanjeeb for your support
Thanks @sbaskax . Can you please mark @thomask suggestion as solution so that it can help other people in the community.
Regards - San
Hi @sbaskax - Can you refresh the SPICE again to update the data type.
Regards - San