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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
LaurenceSD
Advocate II
Advocate II

Measure to find how many products have been booked

Hi, 

 

I have a list of Hotels and List of bookings, I want to find a masure to calculate how many of those hotels have been booked.

 

My Measure for number of hotels is 

Enabled Hotels = COUNTROWS(Hotels)
 
My measure for Hotel Bookings is 
HotelBookings = DISTINCTCOUNT(HotelBkg[BookId])
 
How can I create a new measure to filter down to only those that have had a booking, in whatever date period is selected by the end user?
 
Thanks

 

1 ACCEPTED SOLUTION
Prabhat
Frequent Visitor

HotelCounts = Calculate(Count(hotes),filter(Table,table'BookingID"<>Blank())

View solution in original post

3 REPLIES 3
Prabhat
Frequent Visitor

HotelCounts = Calculate(Count(hotes),filter(Table,table'BookingID"<>Blank())

Works perfectly, thank you

mh2587
Super User
Super User

Please share your sample data


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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