Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Hierarchy help

Hi,

 

Im just wondering if there's possibly a function that would help total up however many lower levels there is in a hierarchy e.g. Building name below and display the total (400).

 

The reason I ask is because the first measure ( Total Bookable Hours) for the 200 below comes from an unrelated date table so it doesn't naturally sum upwards. I almost need the Total bookable hours to display for how ever many occurences of a room there is and display total for the building.

 

The measure reads 

Total Bookable Hours =
CALCULATE(
COUNT(vwDimDate[Date]),
FILTER(vwDimDate, vwDimDate[WorkingDayFlag] = 1)) * 10

 

Ive looked into isinscope but the second part for the building I cant seem to work, and the measure totals dont seem to help.

 

Hope that makes sense

 

 

Thanks

 

Liam

  • Hi , Anonymous 

    It looks like the same thread there.

    So I directly tested the pbix  you  provide there.

    It is unreasonable to establish relationship between tables through the field "Date" and  "Start date"

     

    Through your original formula, I guess  you may just want to get the result of   [count of  all working days in the date] * 10.

    If it is ,  try  this measure as below:

    Measure = 
    SUMX(GROUPBY('Bookings','Bookings'[Building Name],'Bookings'[Room]),COUNTROWS(FILTER(DISTINCT('Bookings'[Start Date]),WEEKDAY([Start Date],2) IN {1,2,3,4,5})) *10 )

    pbix attached 

     

    Best Regards,
    Community Support Team _ Eason

     

     

     

7 Replies