Forum Discussion
Learn2Share
3 years agoFrequent Visitor
How to replace column values using DAX measure?
Hi, Is it possible to change column values using dax measure (no option to modify power query/tranform data option, no option to create a calculated column as Powerbi is connected to AAS live con...
- 3 years ago
Try this measure:
Output Value = SWITCH ( MAX ( Table1[Existing Field Values] ), 1, "P1", 2, "P2", 3, "P3", BLANK (), "Other" )
Anonymous
2 years agoNot applicable
I appreciate the response. I get what you're saying, but I'm not sure how to modify the measure to return the first result. Can you provide what the full measure would look like based on the above example? Thanks!
DataInsights
2 years agoSuper User
Anonymous,
Something like this:
Test Measure = MAX ( 'DimCatalogItemServiceSDD'[ItemName] )
You mentioned that you added your measure to a blank table visual. That means there's no filter context (other than external filters) so the max value of ItemName in the entire column (considering external filters) is what gets returned. It's better to create a lookup table than to use DAX.