Forum Discussion
kg4u
3 years agoHelper II
How to create a measure using a range
Hey PBI Group,
I have an easy one for you today, I'm still a rookie and trying to learn...
In my Data table, I have a column called Days Open. What I would like to do is create several measures based on the values in the Days Open column.
For example:
<30 Open = CALCULATE(COUNTROWS('Data Table'),'Data Table'[Days Open] > 0, <=30)
but the syntax isn't correct, and I am not able to find any examples of how to use a Range to create the measure. Any suggestions?
Thank you!
Just a small tweak should work. You need to write the 'Data Table'[Days Open] again and specify to use AND (&&) or OR(||).
<30 Open = CALCULATE(COUNTROWS('Data Table'),'Data Table'[Days Open] > 0 && 'Data Table'[Days Open] <=30)