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
Syndicate_Admin
Administrator
Administrator

Calculate the minimum expression

Hello everyone.

I've been working on a report that's pretty complicated because of the iterative calculation in it.

The first part was resolved thanks to the contribution of @Ahmedx in this link: https://community.fabric.microsoft.com/t5/Translated-Spanish-Desktop/M%C3%A1ximo-Com%C3%BAn-Divisor/...

The second part consists of dividing CBT by MCD, the result must be even to eliminate prime numbers, therefore it has an ISODD and if CBT is negative it must be zero.

AlePeraltaM_0-1691496728901.png

In the example above, CBT 1 is the first division between CBT and MCD 1, then, with the formula of @Ahmedx I created the MCD 2, but when trying to do the division, the calculation is broken by memory problems.

AlePeraltaM_1-1691496725625.png

What I intend to do is:

CBT / MCD 1 : Si CBT < 0, 0, CBT / MCD 1

CBT 1 Odd = If the result above is odd, add up to 1 unit.

MCD 2 = Calculate MCD from CBT 1 Odd

CBT 1 Impar / MCD 2 : Si CBT < 0, 0, CBT 1 Impar / MCD 2

CBT 2 Odd = If the result above is odd, add up to 1 unit.

MCD 3 = Calculate MCD from CBT 2 Odd

CBT 2 Impar / MCD 3 : Si CBT < 0, 0, CBT 2 Impar/ MCD 3

CBT 3 Odd = If the result above is odd, add up to 1 unit.

So make a loop until CBT is in the minimum expression.

Here the file:

https://drive.google.com/file/d/1U5EQxlTGjKUzajrzunOGr6KqCdq0csMl/view?usp=drive_link

Thanks a lot!

0 REPLIES 0

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.