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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
SrivatsaB
Frequent Visitor

Create Measures with Circular Dependency.

I am trying to convert an excel data output to PowerBI and the measures actually have circular dependency. Can someone help me with a solution?

 

SrivatsaB_0-1734320667622.png

 

1.Beginning for first month has to be derived from table with certain condition, from second month it has to pick previous month ending value.
2. Ending is sum of all the rows above for that month, Beginning + M1+M2+M3+M4, every ending value has to be sum of all the rows above from corresponding month.
3.M1, M2,M3,M4 - all the these are direct aggregations from table with a criteria.

Month is a selector the end user, they can choose whatever month they want and the month columns has to start from that selected month till the end of that year.


I am looking for a DAX to calculate Beginning and Ending measures. I am open to ideas to tweak this from data end too.
Thank you.

 

3 REPLIES 3
SrivatsaB
Frequent Visitor

Thanks for your response @danextian . You are right on Ending, we don't have that in table.

I have Beginning , Category A & Category B from the table. Category C is based out of a whatif parameter, Category D is the previous month value.

Now my ending is, Beginning + Category A + Category B + Category C + Category D. 
This ending has to be called up to the February Beginning section.

Please see the sample pbix in my previous reply which was based solely on the initial data provided.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
danextian
Super User
Super User

Hi @SrivatsaB 

Calculating the beginning, YTD and ending balances is pretty simple but what complicates your use case is you are attempting to add an extra row (beginning or possibly ending) which most likely doesn't exist in your fact  table. Matrix in Power BI works just like a Pivot table in Excel, you can't just add add custom rows/columns and still make it work like you are editing a range of cells.

 

Attached is a sample pbix to help you get started with.

 

danextian_0-1734324211756.png

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.