Forum Discussion
Jackofall
Resolver I
7 years agoCalculated numeric field based on text field
I have a hard time understanding the prereqs of DAX. I am playing around with a toy database to learn more about PBI. I have a table that cointains a text column named Rank. The values there are d...
AlB
Community Champion
7 years agoHi Jackofall
I think you want to do that in a calculated column rather than in a measure. There you will not have the problems of aggregation. In a measure you do not have a row context, that is why DAX does not know what you are referring to when you write Draft_Ranking[Rank]
Jackofall
Resolver I
7 years agoThanks for the feedback.
When I changed the Default Summarization I could sord Rank by SortOrder.
What I would do in T-SQL is to sum(case when d.Rank = 'S' then 1 else 0 end) as 'S' so I understand where my reasoning was off. There is the aggregation Another way I force sort order is to use union and set different values '3' as [Sortorder] then sort on that column in Report Builder. I managed to fool my self totaly. Thanks for straightening me out.