The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
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
Solved! Go to Solution.
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 )
Best Regards,
Community Support Team _ Eason
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 )
Best Regards,
Community Support Team _ Eason
Hi @v-easonf-msft ,
My apologies, I thought it had been deleted. Thankyou so much for your time and the measure.
Regards
Liam
@Anonymous , refer if this can help
https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/
Hi @amitchandak ,
Thanks for your reply. This article relies on the measure summing upwards naturally which unfortunately my measure doesnt do.
Thanks
Liam
@Anonymous , Check if this can help
https://community.powerbi.com/t5/Desktop/Dynamic-measure-calculation-for-hierarchy-data/td-p/592546
Hi @amitchandak ,
Thanks again for replying. They are all using the SUM function from the same table which I'm unfortunately not.
I'm not sure whether its possible, as if I use the isfiltered or isinscope it will always equal the same total as the lower level. I was hoping of an alternative approach where it could total the lower level on the fly
I tried like this
When Filtered = if( ISINSCOPE('Item'[Category]),SUM(Sales[Net Sales]),MIN(Sales[Net Sales]))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
78 | |
66 | |
52 | |
51 |
User | Count |
---|---|
127 | |
116 | |
78 | |
64 | |
63 |