cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
genek79
New Member

create calculated column that averages the units sold by product.

Looking for help with this, please...

genek79_0-1643253332554.png

 

Thank You

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Picture1.png

Avg UnitsSold per Product CC =
VAR CurrentRowProduct = Data[Product]
VAR PerProductTable =
FILTER ( Data, Data[Product] = CurrentRowProduct )
RETURN
AVERAGEX ( PerProductTable, Data[Unit Sold] )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Picture1.png

Avg UnitsSold per Product CC =
VAR CurrentRowProduct = Data[Product]
VAR PerProductTable =
FILTER ( Data, Data[Product] = CurrentRowProduct )
RETURN
AVERAGEX ( PerProductTable, Data[Unit Sold] )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank You!!

amitchandak
Super User
Super User

@genek79 , a new column

Averagex(filter(Table, [Product] = earlier([Product] ) ), [Unit Sold])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!