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
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
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.