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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors