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

Validate two data types on the same column in Power Query

Hi everyone, I need some help, I have a table with several records where I need to validate the TYPE column with the following criteria:

 V4 >X0 then V4+X0+ZK
 V4 < X0 then X0-V4+ZK

 

Spotto_1-1676550833163.png

** in this case V4 < X0 then X0-V4+ZK

I need to create the formula (rule) in the POWER QUERY that brings me the final value = 12166,88

 

Spotto_2-1676552372989.png

** in this case  V4 >X0 then V4+X0+ZK then the result would be = 24144,48

 

Could someone help me to do this in power query?
thank you all 🙂

1 ACCEPTED SOLUTION
AlexanderPrime
Solution Supplier
Solution Supplier

I'd recommend Pivoting both the TIPO and VALOR_DIVDA columns in Power Query, That way you'd get ZK / V4/ X0 columns that you could then do your basic math checks against by adding a new calculated column and doing your IF statement

 

AlexanderPrime_0-1676554281950.png

AlexanderPrime_1-1676554294058.png

 

 


Please note - I am not affiliated with Microsoft, I'm just an end user like yourself.
Just a regular guy doin' Data Science.

If my post has helped you, please don't forget to thumbs up or click "Accept as solution" if it solved your problem!

View solution in original post

1 REPLY 1
AlexanderPrime
Solution Supplier
Solution Supplier

I'd recommend Pivoting both the TIPO and VALOR_DIVDA columns in Power Query, That way you'd get ZK / V4/ X0 columns that you could then do your basic math checks against by adding a new calculated column and doing your IF statement

 

AlexanderPrime_0-1676554281950.png

AlexanderPrime_1-1676554294058.png

 

 


Please note - I am not affiliated with Microsoft, I'm just an end user like yourself.
Just a regular guy doin' Data Science.

If my post has helped you, please don't forget to thumbs up or click "Accept as solution" if it solved your problem!

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
Top Kudoed Authors