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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors