Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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

Frequent Visitor

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.




Frequent Visitor

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])

Super User
Super User

@General 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:

Also, please see this post regarding How to Get Your Question Answered Quickly:

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!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

Helpful resources

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors