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

POWER BI - DAX FORMULA - how do i get the average value for a specific item?

Say i have a data with the ratings for a particular product 

and I want to find the average rating for just one of those products - what is the DAX formula? I am trying but keep getting error messages. 

 

1 ACCEPTED SOLUTION
rautaniket0077
Resolver I
Resolver I

Hi @G_WHO ,

you can achieve this by using "AllSelected" Dax.
As you can see in the below image, when i am selecting the product from slicer the 1st table is giving me the average of that product where as the 2nd one is giving me Sales for it.

rautaniket0077_0-1669716838979.png

 

Dax--

Average of Perticular Product =
    CALCULATE(
        AVERAGE(Orders[Sales]),
        ALLSELECTED(Orders[Product Name])
    )
 
Please mark my post as Answer if it solves your issue.





 

View solution in original post

2 REPLIES 2
rautaniket0077
Resolver I
Resolver I

Hi @G_WHO ,

you can achieve this by using "AllSelected" Dax.
As you can see in the below image, when i am selecting the product from slicer the 1st table is giving me the average of that product where as the 2nd one is giving me Sales for it.

rautaniket0077_0-1669716838979.png

 

Dax--

Average of Perticular Product =
    CALCULATE(
        AVERAGE(Orders[Sales]),
        ALLSELECTED(Orders[Product Name])
    )
 
Please mark my post as Answer if it solves your issue.





 

tamerj1
Super User
Super User

Hi @G_WHO 
It would perhaps help more if you provide little more details.

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.

Top Solution Authors