Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.