cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Meassure with replace/substitue

Okay guys

 

I need to find out how to solve this. 

 

Your help is much appreciated. 

 

As you can see in the picture the measure "Return Value" is the same measure as above just with a minus.

 

When I take that meassure into a pivottable as a vakue and select column SO art and colmn Prognose as rows ; I want  column "SO art" ZP01 to be ZP00, but only for PrognoseID 9002970.

 

Its important to do it in a measre and not a column, if possible. I tried to read about substitute but could not really make it work. 

Is there anyway to solve this? or next best would be in  a calculated column.

 

I want the new measure to have the same value, but some values in one column based on another coulmns ID, need to be swtiched. (only for this meassure).

 

So in the end when I out both values in a table with SO art og Prognose ID as rows we would see that prognose ID 9002970 has SO art ZP01 in first measure "value with original string" but ZP00 in measure "Return Value"

 

DAX help.jpg

3 REPLIES 3
Anonymous
Not applicable

Hello Guys 

 

just to be clear. I want the output in a table to be like this

 

Dax help part 2.jpg

 

@Greg_Deckler , thanks! I dont know how to send you data example. Im sorry, but I hope you should be able to understand my issue now.

 

 

 

Anonymous
Not applicable

Hello again

 

I managed to find out how to make a calculated column for the change of SO art.

 

Now i just want this formula into a measure.

 

=IF(OR(Tabel1[PrognoseID]=9002970;Tabel1[PrognoseID]=9003090);SUBSTITUTE(Tabel1[SO art];"ZP01";"ZP0000");[SO art])

Greg_Deckler
Super User
Super User

@Anonymous Sorry, having trouble following, can you post sample data as text and expected output?


Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!