Forum Discussion
Anonymous
6 years agoNot applicable
Switch not working in a calculated column
Hello - I have this formula below working as a measure. But when trying to use as a calculated column, I do not get an error message, but I do not get any results past the first condition. ...
- 6 years ago
You have an extra () after the Opportunity Creation Date field. Use this:
= Duration.Days(DateTime.Date([Opportunity Create Date])-DateTime.Date([Actual Close]))that will return the number of days as a whole number.
amitchandak
Super User
6 years agoAnonymous , you have created a measure. The measure will execute with row context, so if you do not select any row it will choose the first true for grand total. When used, Axis/Row/group by in a visual that it take that row context.
You can force a row context like this
maxx(summarize(table,table[ID],"_1",[Rules]),[_1])
In this, it will get executed at ID level and then max will be taken
refer : https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/