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
VendettaBob
Helper II
Helper II

Measure divided by dimension

Hi,

 

I am trying to calculate a Monthly Utilistaion figure which is a cross between dimensions grouped and a _TotalHours measure.

 

I have the following dimensions highlighted in blue

My measure is in Green

I need to create the yellow utilisation:

 

VendettaBob_0-1605113046712.png

 

In theory the utilisation figure should be easy enough to calculate: _TotalHours / Agreement.ContractedHours per Euip and Month.

 

I figured I would need to summarize the columns first and then do the calc?

 

Any help would be appreciated.   

 

Thanks 

Bob

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@Fowmy 
Is this table already summrized or just original table? If that is the original table try following:

 

Monthly utilization = 
var utilization =[_TotalHours] / MAX(Agreement.ContractedHours)
Return Calcuate ( [utilization], filter(allselected(Table), [Date].[Month.no]=max([date].[month.no])))

 

If you already have the month number in a column you can just use month=max([month]) in the filter. 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

Thank you for your reply, it's very much appreciated.

 

However, this also needs to be calculated for each Equp.Item not just for the month.

 

So just to recap:

 

VendettaBob_0-1605603391252.png

 

The monthly utilisation is:

201801 is 3.08%

201802 is 17.11%

201803 is 43.75%

 

The total utilisation would then be AVERAGE(3.08 + 17.10 + 43.75) = 21.23%

 

Would it be possible to achieve this vwith DAX or would I need to create a fact table with this information pre calculated?

 

Many thanks,

Bob

Fowmy
Super User
Super User

@VendettaBob 

You can try this measure:

Monthly Utilization =
DIVIDE(
    [_TotalHours], 
    MAX(Agreement.ContractedHours)
)

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.