- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use of Table.ReplaceValue
Hello,
I am trying to use the Table.ReplaceValue function and not having much success. I have spent much time looking at and trying various solutions to no avail. Most of the solutions I found were simular to Xiaoxin Sheng's answer in post Solved: Replace value in Power Query based on condition - Microsoft Power BI Community
#"Replaced Value" = Table.ReplaceValue(#"Changed Type",each [Category],each if [PO]=1006 and [Category]="D" then "C" else [Category],Replacer.ReplaceText,{"Category"})
my version is
#"ReplacedValue" = Table.ReplaceValue(#"Renamed Columns", each [EVP], each if [department] = "Unassigned" then "No Department" else [EVP], Replacer.ReplaceText,{"EVP"})
Which of course produces no errors or changes to the EVP column. I am assuming that my version should value in the [department] column and replace the corresponding [EVP] value with "No Department" and if department does not match "Unassigned" then [EVP] would remain as is. Any ideas why this would fail? I am not very clear on what Replacer.ReplaceText is doing so maybe there is a problem there?
I would appreciate your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, @bvilten
If your problem is not yet solved, can you provide some sample data for testing? What kind of results do you expect and can you show them with pictures as well?
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you provide some data?
If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!
Proud to be a Super User!
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
09-12-2024 07:05 AM | |||
10-28-2023 05:09 AM | |||
11-04-2024 12:23 AM | |||
04-13-2022 06:03 AM | |||
04-08-2020 08:35 PM |
User | Count |
---|---|
115 | |
76 | |
45 | |
43 | |
32 |
User | Count |
---|---|
172 | |
90 | |
66 | |
46 | |
45 |