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
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors