Forum Discussion
prakash11440278
8 years agoPost Prodigy
Multiple IF Conditions in Custom Column
Hi All, I am calculating Age Category DAX formula based on the Incident logged. But i want below DAX formula to be replicated in Custom Column in Query Editor for Sorting purpose. Please provide ...
- 8 years ago
Hi,
Can you please try this custom column query:
(if ([Age of Incidents]>=0 and [Age of Incidents]<30) then "0-30" else if ([Age of Incidents]>=30 and [Age of Incidents]<60) then "30-60" else if ([Age of Incidents]>=60 and [Age of Incidents]<90) then "60-90" else if ([Age of Incidents]>=90 and [Age of Incidents]<180) then "90-180" else if ([Age of Incidents]>=180 and [Age of Incidents]<90) then "180+" else "")
Thanks,
Prasanth.C
+91 9043194307
Anonymous
8 years agoNot applicable
If you are looking for sorting only then You can do the sorting in the visuals/ data view also.
Thanks
Raj
- prakash114402788 years agoPost ProdigyHi Rajendran, Thanks for your reply.
I believe we cannot sort the data based on the calculated column created in PBI Desktop and the format of the data type is not interger. We can sort the data based on numerical values, that can be done by adding new conditional column in query editor. I tried to create it but multiple conditions not possible using conditional column. If possible can you please provide the custom column formula for the provide calculated column.