Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kg4u
Helper II
Helper 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!

1 ACCEPTED SOLUTION
Syk
Super User
Super User

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)

View solution in original post

2 REPLIES 2
Syk
Super User
Super User

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)

Awesome thanks Syk!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.