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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.