Forum Discussion
DAX Function assistance
- 5 years ago
Hey EmiliaB_123 ,
you would create a measure for the zeros like this one:
Zeros = CALCULATE( COUNTROWS(myTable) myTable[ColumnWithZeroValues] = 0 )And a similar for the ones and a normal COUNTROWS without the filter for all values. Then you can use all of the measures in the selected time period and you get your result.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
EmiliaB_123 also looks good for me. I could take a look into the file if it doesn't contain confidential information or if you could remove sensitive data.
Otherwise it's a little hard to say without investigating further.
Hi selimovd , I checked the definition of DATESINPERIOD and it seems that the output of this formula is a date. What I need is to consider the last year starting from today to count to rows, so the output should be a whole number. Is there maybe another formula that I could check?
Thanks.