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

Group By

I have a metric which is appearring multiple times due to difference in value. What I wanted to do is to show the average of the  activity. The below example will make it clear.

 

Year             Actvity     Value

1/1/2020          A             4

1/1/2020           A            8

1/1/2020          A             6

1/1/2020         B               7

1/1/2020           C            5

 

what i like is to show the value  as, 

for A we have to do an average

1/1/2020       A              A - 6 (2020)

1/1/2020       B               B - 7 (2020)

1/1/2020       c               C  -  5 (2020)

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

 Hi, @Diptarup 

Try to create a measure bleow:

_Result =
SELECTEDVALUE ( 'Table'[Activity] ) & "-"
    & AVERAGEX ( 'Table', AVERAGE ( 'Table'[Value] ) ) & "("
    & YEAR ( SELECTEDVALUE ( 'Table'[Year] ) ) & ")"

Sample:

v-angzheng-msft_0-1619086423464.jpeg

Result:

v-angzheng-msft_1-1619086423467.png

Please check the sample file I attached for details.

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

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

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

 Hi, @Diptarup 

Try to create a measure bleow:

_Result =
SELECTEDVALUE ( 'Table'[Activity] ) & "-"
    & AVERAGEX ( 'Table', AVERAGE ( 'Table'[Value] ) ) & "("
    & YEAR ( SELECTEDVALUE ( 'Table'[Year] ) ) & ")"

Sample:

v-angzheng-msft_0-1619086423464.jpeg

Result:

v-angzheng-msft_1-1619086423467.png

Please check the sample file I attached for details.

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

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

amitchandak
Super User
Super User

@Diptarup , Try a new measure like

 

averageX(filter(allselected(Table), table[Actvity] = max(table[Actvity])), [Value])

 

or

 

 

averageX(filter(allselected(Table), table[Actvity] = max(table[Actvity]) && table[Date] = max(table[Date])), [Value])

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.