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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dbatllevz
Frequent Visitor

Avoid circular dependency and wrong total measure

Dear all

 

I have a table (A) with actual inventory days and sales forecast. In another table (table B) I have max and min inventory days, both tables are related by a common key)

I tried to create 3 new columns in table A to have sales over max and under min and in range with very basic formulas:

Column 1 - Sales under Min= if(actuals<min, sales forecast,0)

Column 2 - Sales over Max= if(actuals>max, sales forecast,0)

Column 3 - In range= sales forecast-(min+max)

 

Column 1 is ok, issue is that when I try to create the other 2 in table A as appears a circular dependency

Therefore, to avoid this, I tried to create columns 2 and 3 with a measure (using the same formula)

But it seems that column 2 is working for row calculation but not in the grand total. It is calculating based on total for the column and not for each row:

As you can see, when in a row Actuals>Max it returns sales forecast
But, in the totals is caclulating 1918>1023=sales forecast, or in the case that is actuals<max then returns 0 as condition is not true

I understand that the measure is not wrong as somehow is doing what i wrote in DAX, but I would like to know how I can fix this to have in the grand total the sum of all rows and not the calculation based on totals

dbatllevz_1-1687774983838.png

Many thanks in advance for the support

 

0 REPLIES 0

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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