Forum Discussion

PowerBiNoob's avatar
PowerBiNoob
Frequent Visitor
9 years ago
Solved

Grouped Average

Hey,   I need to get the sum amount values (per Group and per Month and per Week_Timestamp) I am just not able to get the values as "grouped". Hope this make sense. Please ask if there is anythin...
  • dearwatson's avatar
    dearwatson
    9 years ago

    I have a little rule that says if you have the option of doing it in TSQL before you get to Power BI then thats usually better since the model will be faster but assuming you cant do that:

     

    so you've mentioned a COUNT a SUM and an AVERAGE but It looks like you just use Average - is that like a daily average? so in the first column you had on average 31.3 items overdue each day?

     

    You could just build one measure the calculates "Daily Average"

     

    Something like

    Overdue Items = COUNTROW(Table)

    Days = DISTINCTCOUNT(Table[Date])  -- note but be a date not a datetime

    Daily Average = DIVIDE([Count of Overdue],[Days],0)

     

    Then you put that measure in Values, Week_End in the Axis, Group in the Legend.

     

    for each Week and Group it will determine how many items divided by how many distinct days??

     

    is that what you are after?