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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors