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
marcgotzens
New Member

Average of a measure

Dear all,

 

I wanted to ask about how to make average of a measure because the posts I've seen in the forum didn't solve my problem so far.

I would like to know the average price of the rooms I sell in a period which Im using the measure:

ADR = divide(Produccion[Produccio Total];sum(OcupacionesHAB[oha_res_hab_int])).

Both, "Produccion[Produccio Total]" and 2OcupacionesHAB[oha_res_hab_int]" are related by the field date, so I can list the ADR (Average Daly Rate) for each day.

 

Now I would like to know the average ADR of a filtered period of dates, so I would like a measure which returns a single value of average daily rate for the filtered period.

 

I don't understand why using the funcion Average() over this measure I get the value 1 in return.

 

Can anyone help me with this?

 

Thanks in advance,

 

Marc

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@marcgotzens

 

Try something on this pattern

 

average of ADR =
AVERAGEX ( ALLSELECTED ( TableName[Dates] ), [ADR] )

Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@marcgotzens

 

Try something on this pattern

 

average of ADR =
AVERAGEX ( ALLSELECTED ( TableName[Dates] ), [ADR] )

Regards
Zubair

Please try my custom visuals

That's perfect! Thank you!

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.