# Workaround for a circular dependency problem



## Shales (Apr 12, 2018)

Morning all,

I only just discovered my favorite Excel forum has a Power BI section : )

 I am searching for a workaround to bypass my Circular Dependency issue. I have searched for answers on this but because I am new to Power BI I am unable to solve my issue with the explanations I've seen given to other people in my predicament.

Here is my working DAX;


```
Claims with Outlay = 
COUNTROWS (
    FILTER (
        ALLSELECTED ( 'Reporting_TPL (2)'[Final Claim Amount Gross] ),
        CALCULATE ( SUM ( 'Reporting_TPL (2)'[Final Claim Amount Gross] ) ) > 0
    )
)
```

It's pretty straight forward. I just want to count how many records there are where an amount if >0.

This is working fine but when I create a similar column in my report for a different count it gives me the "Circular" Issue. See code below;


```
Claims Co-Ins = 
COUNTROWS (
    FILTER (
        ALLSELECTED ( 'Reporting_TPL (2)'[Dual Insurance Contribution Received] ),
        CALCULATE ( SUM ( 'Reporting_TPL (2)'[Dual Insurance Contribution Received]) ) > 0
    )
)
```


Please could somebody help? thank you.

Regards
Gavin


----------



## Matt Allington (Apr 14, 2018)

My advice is to embrace Measures, not Columns. https://exceleratorbi.com.au/calculated-columns-vs-measures-dax/


----------

