Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi there!
I have a table with one column where all values should be 1 or less than 1. However, there are quite a lot of values above that and I was wondering if there was a way I could change this easily.
Solved! Go to Solution.
You can change this in Power Query using the suggestion below: If it works for you, kindly mark this as solution so anyone with similar issues can easily find it.
Step 1: Rightclick on the column in Power Query and Select Replace Values
Step 2: In the replace values dialog box, replace 1 with 0. You will have something like the below
Table.ReplaceValue(#"Changed Type",1,0,Replacer.ReplaceValue,{"Item"})
Step 3: From the above code, go into the PowerQuery formula bar and replace the 1 with the below
(each if [Item] >1 then [Item] else 0). Then you will have something like the below:
Table.ReplaceValue(#"Changed Type",(each if [Item] >1 then [Item] else 0) ,0,Replacer.ReplaceValue,{"Item"})
You can change this in Power Query using the suggestion below: If it works for you, kindly mark this as solution so anyone with similar issues can easily find it.
Step 1: Rightclick on the column in Power Query and Select Replace Values
Step 2: In the replace values dialog box, replace 1 with 0. You will have something like the below
Table.ReplaceValue(#"Changed Type",1,0,Replacer.ReplaceValue,{"Item"})
Step 3: From the above code, go into the PowerQuery formula bar and replace the 1 with the below
(each if [Item] >1 then [Item] else 0). Then you will have something like the below:
Table.ReplaceValue(#"Changed Type",(each if [Item] >1 then [Item] else 0) ,0,Replacer.ReplaceValue,{"Item"})
That worked, thank you so much!
you chould change the values to an if statement.
can you provide more information such as what does your table look like, what is the rule one needs to apply? ie how yo you know which value to convert it to.
Proud to be a Super User!