Forum Discussion

mypants's avatar
mypants
Regular Visitor
8 years ago

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: