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
Isidro
Helper IV
Helper IV

Enter a data validation in a Power BI or Power Query query

I would like to know if it is possible to perform a validation of data of a column in a query to verify if the data is correct and to change the incorrect data by the correct data.

Thank you very much and greetings
.

1 ACCEPTED SOLUTION

my suggestion is that you do a merge in power query  with your list that you want to validate against the list that has the valid numbers using an anti join to pull back all the non matching values which dont match.

more explanation here.

http://radacad.com/how-to-change-joining-types-in-power-bi-and-power-query

 

 

in terms of your list for correcting the numbers, how many correct values do you have, this part is probably going to be more complicated depending on how much data you have, i guess you would need to find where the smallest difference is between  the invalid number and a valid number but how to do that exactly , not sure maybe someone else can assist there.

 





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!




View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

can you give more details as in what exactly you would like to validate and what action to take if it isn't?





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!




Hello Vanessafvg,

 

I have a query like the following:Respuesta check.jpg

 

I want to verify that each of the values that are in that column are in a list of unique values, and if some of those values are not in the list of unique values, those values are replaced by the closest value.

For example, if 46500000 is not a correct value, all 46500000 in that column are replaced by 462000000.

Thank you very much and greetings.
 

my suggestion is that you do a merge in power query  with your list that you want to validate against the list that has the valid numbers using an anti join to pull back all the non matching values which dont match.

more explanation here.

http://radacad.com/how-to-change-joining-types-in-power-bi-and-power-query

 

 

in terms of your list for correcting the numbers, how many correct values do you have, this part is probably going to be more complicated depending on how much data you have, i guess you would need to find where the smallest difference is between  the invalid number and a valid number but how to do that exactly , not sure maybe someone else can assist there.

 





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!




Hello Vanessafvg,

 

Thanks you very much for your explanation.

 

Best regards.

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.