Forum Discussion
Two Calculated columns with RELATEDTABLE gives Circular Dependency
- Anonymous1 year ago
Hi hebe ,
You can try the following DAX to add calculated columns.Issued = VAR _SEL= CALCULATE ( COUNTROWS ( 'Status' ), ALLEXCEPT(Person,Person[Id]), 'Status'[Status] = "Issued" ) RETURN IF ( _SEL > 0, "Yes", "No" )Cancelled = VAR _SEL= CALCULATE ( COUNTROWS ( 'Status' ), ALLEXCEPT(Person,Person[Id]), 'Status'[Status] = "Cancelled" ) RETURN IF ( _SEL > 0, "Yes", "No" )
Please see the attached pbix for reference.Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello hebe,
Circular dependecy error problem was shared before in the community. You can add column in PowerQuery.
https://community.fabric.microsoft.com/t5/Desktop/Circular-dependency/m-p/2978637#M1017963
And I don't understand the code have you create this code in PQ or DAX(new column). Because in DAX and function can't be use like this:
HaveCancelledLicense =
IF ( License = "YES" and Cancelled = "YES", "YES", "NO" )
The correct way is:
HaveCancelledLicense =
IF ( License = "YES" && Cancelled = "YES", "YES", "NO" )
Kind Regards,
Gรถkberk Uzuntaล
๐ If this post helps, then please consider Accepting it as a solution and giving Kudos โ it helps other members find answers faster!
๐ Stay Connected:
๐ Medium |
๐บ YouTube |
๐ผ LinkedIn |
๐ท Instagram |
๐ฆ X |
๐ฝ Reddit |
๐ Website |
๐ต TikTok |