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

Measure based on measure

Hi community,

 

Im trying to get some sort of probabilty for a room for a given hour that it is occupied.
I have a table contain all the meetings in certain rooms, each room has 2 chambers., start and end date for each meeting.
I want to look at the odds that when someone chooses a room, it is currently occupied for that hour, and then take a column average across the given date interval for all the rooms on that hour. Instead of the column total, the average probability should be calculated.


Hopefully my screenshot will make things a bit more clear.

forumpost.png

 


First matrix shows the number of meetings between the specified date and is derived using the following measure:

Occupancy v1 = 
VAR MinDateTime =
    MIN ( 'Dim_Date'[Date] ) + MIN ( 'Dim_Time'[Time] )
VAR MaxDateTime =
    MAX ( 'Dim_Date'[Date] ) + MAX ( 'Dim_Time'[Time End] )

    VAR Counter = 
    DAY(MaxDateTime)

RETURN

    CALCULATE ( 
        DISTINCTCOUNT ( 'MRoom'[CDR_ID]); 
        'MRoom'[Start_datetime] < MaxDateTime;
        'MRoom'[End_datetime] >= MinDateTime
    )

The second matrix is incorrect as it should give me the probability which Im after but again, incorrect.

Value 101 was a test, probabilities can't be higher than 100 of course*

Can a measure be created to calculated these probabilities based on the values of another measure??
Im quite new to DAX and PB and not sure about context etc.

Thanks for any info or tips on how to model my model!

Cheers.

1 REPLY 1
v-diye-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry not very clear from you post what you are looking for. Could you please kindly share your dummy pbix/ simple worksheet ? and indicate your expected result? i'd like to provdie further advice.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

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.