Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a table SalesAnalysis, in which I have 4 columns - Year, Month, Day,WeekNo.
In this table I have 2 type - Monthly and Weekly.
For Monthly data I get values for Year, Month,Day columns, and for Weekly data I get values for Year, WeekNo.
I need to create a relationship between this table and Date master.
I created a calculated column in the SalesAnalysis table for Monthly_Dt for monthly data and Weekly_Dt for weekly data and combined them in another calculated column Date, where I added the type filter.
DAX -
Monthly_Dt = IF(ISBLANK('SalesAnalysis'[Month]) || ISBLANK('SalesAnalysis'[Day]),BLANK(),DATE(VALUE('SalesAnalysis'[Jahr]),VALUE('SalesAnalysis'[Month]),VALUE('SalesAnalysis'[Day]))) Weekly_Dt = CALCULATE(max('Dim Calendar'[Date]),FILTER('Dim Calendar','Dim Calendar'[YearWeek]='SalesAnalysis'[YearWeek]))
IF('SalesAnalysis'[Type]="Monthly", 'SalesAnalysis'[Monthly_Dt],IF('SalesAnalysis'[Type]="Weekly",'SalesAnalysis'[Weekly_Dt],BLANK())) |
But when I'm trying to create a relationship, I'm getting below error -
A circular dependency was detected: SalesAnalysis[Weekly_Dt], 2d4d65ad-ef12-2dd7-823a-
6b8a1e2b983f, SalesAnalysis[Date], SalesAnalysis[Weekly_Dt].
Solved! Go to Solution.
Hi @PranavR ,
Thanks for reaching out to the Microsoft fabric community forum.
Please go through the below documents which may help you in resolving the issue:
FIX CIRCULAR DEPENDENCY ERROR / 2 Common Scenarios and how to fix them / Beginners Guide to Power BI
Solved: Need Help in Resolving Circular Dependency - Microsoft Fabric Community
Solved: Circular dependency - Microsoft Fabric Community
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Menaka.
Community Support Team
Hi @PranavR ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @v-menakakota,
This doesn't resolve the problem. Our Date dimension is in DAX, so it's not available in Power Query.
Hi @PranavR ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @PranavR ,
Thanks for reaching out to the Microsoft fabric community forum.
Please go through the below documents which may help you in resolving the issue:
FIX CIRCULAR DEPENDENCY ERROR / 2 Common Scenarios and how to fix them / Beginners Guide to Power BI
Solved: Need Help in Resolving Circular Dependency - Microsoft Fabric Community
Solved: Circular dependency - Microsoft Fabric Community
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Menaka.
Community Support Team
Hi @PranavR ,
I wanted to check if you had the opportunity to review the information provided by @johnbasha33 . Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution so other members can easily find it.
Thank you.
Hi @PranavR ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
To avoid circular dependency and still get the desired Date, do this:
Go to Power Query (Transform Data)
In the SalesAnalysis table:
Add a custom column like:
After that, merge with the Dim Calendar table on
[YearWeek] (only for "Weekly" type rows)
From that merged table, bring in the [Date] column
Final step: create a single Date column that pulls either the monthly date or the merged weekly date
This avoids using DAX for something that’s fundamentally a data transformation task.
If you must use DAX:
Don't use CALCULATE(MAX(...)) that depends on the related table.
Instead, consider bringing YearWeek-Date mapping as a lookup column into the SalesAnalysis table using Power Query or with a LOOKUPVALUE if small and not recursive:
Weekly_Dt = LOOKUPVALUE('Dim Calendar'[Date], 'Dim Calendar'[YearWeek], 'SalesAnalysis'[YearWeek])
LOOKUPVALUE is a scalar function and doesn't drag in the entire filter context, making it safe to use without triggering circular dependencies — in most cases.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !@PranavR
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
73 | |
42 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
42 |