Forum Discussion
CountIF value is
- 4 years ago
So is it correct that you can only use these measures in your report and not in the dataset?No. It's possible to write calculated columns that work but you need to be more careful. Please read the articles I linked for more detail.
Measure are probably the best choice in this case anyway though. More detail on the difference here:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
I'd guess this is because you are using the full table reference in your calculated column, so when you have two calculated columns, each is implicitly referencing the other. Here are a couple of SQLBI articles that should help clarify more fully:
https://www.sqlbi.com/articles/understanding-circular-dependencies/
https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/
If you define these as measures (rather than calculated columns), then I don't think you have the same problem but you might need to tweak the code. Try this as a measure:
Count Quarterly =
CALCULATE (
COUNT ( Table1[Frequency] ),
KEEPFILTERS ( Table1[Frequency] = "Quarterly" )
)