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
Anonymous
Not applicable

ISINSCOPE query

Hi,

 

Could somebody please help me in finishing my ISINSCOPE command?

 

I need the building name to sum the measure 'Total Bookable Hours' at the end, but it wont accept sum or sumx  for the measure of bookable hours.

 

The Building needs to sum all of the rooms bookable hours on a top level of a matrix. So 400 instead of 200 in the file

 

PBIX File 

 

Hierarchy = SWITCH(

    TRUE(),

    ISINSCOPE(

    vw1[Room]), [Total Bookable Hours],

    ISINSCOPE(

    vw1[Building Name]), 

))

 

Thanks

 

Liam

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

// Assuming that
// 1. There is a Building dimension that stores data about buildings.
// 2. There is a Room dimension that stores data about rooms.
// 3. There is a proper Calendar in the model.
// 3. There is a fact table Bookable Hours that for each day stores the bookable
// 	  hours for the relevant combinations of buildings and rooms
//    for each and every day...
// you can write this measure and it'll work correctly without
// any ISINSCOPE.
// Bear in mind that the filtering from dimensions to the fact table
// is one-way.

[Bookable Hours] =
	CALCULATE(
		SUM( 'Bookable Hours'[Hours] ),
		LASTDATE( Calendar[Day] )
	)

 

Best

D

View solution in original post

13 REPLIES 13

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.

Top Solution Authors