cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Learn2Share
Frequent 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 connection)

 

Such that if I pull an attribute "Sno" on table visual &  this measure I should get output as below?

 

SnoExisting Field ValuesMeasure Output Values
11P1
22P2
33P3
4BLANKOther

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Learn2Share,

 

Try this measure:

 

Output Value = 
SWITCH (
    MAX ( Table1[Existing Field Values] ),
    1, "P1",
    2, "P2",
    3, "P3",
    BLANK (), "Other"
)

 

DataInsights_0-1674655588255.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Learn2Share
Frequent Visitor

thank you @DataInsights , this works!

DataInsights
Super User
Super User

@Learn2Share,

 

Try this measure:

 

Output Value = 
SWITCH (
    MAX ( Table1[Existing Field Values] ),
    1, "P1",
    2, "P2",
    3, "P3",
    BLANK (), "Other"
)

 

DataInsights_0-1674655588255.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors