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/
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/
Thanks, read the article and a few others and think that indeed measures make the most sense in this case.
One last additional question you can hopefully help me with. The below code as shared before uses one filter. Is it possible to do two in one measure? So count if Table1[Frequency] = "Quarterly" AND Table1[Frequency] = "Annual" ?? Thanks again!!
Count Quarterly =
CALCULATE (
COUNT ( Table1[Frequency] ),
KEEPFILTERS ( Table1[Frequency] = "Quarterly" )
)