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
mypants
Regular Visitor

Average at Different Grains

Hey All, 

 

I used to have a table that took PowerBi 45 seconds to load and I had to move it into a semi-aggregated state. 

 

I'm a bit stuck on how to create a new column using DAX that will only SUM and DIVIDE the data based on what's filtered (i.e what grain it's at)

 

Obviously in excel for a static query is might look like: SUM(SumRatings) / SUM(Count)... but I need to calculate on the grain of either ProductName, ProductSubGroupName or WeekStarting.

 

My new table looks like this:

 

Capture.PNG

1 REPLY 1
v-caliao-msft
Employee
Employee

@mypants,

 

In DAX, the measure will re-calculate if you change items in your slicer. So you could create your measure by usng SUM and divide function.
https://msdn.microsoft.com/en-us/library/ee634387.aspx
https://msdn.microsoft.com/en-us/library/jj677276.aspx

 

Regards,

Charlie Liao

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.