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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.