Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi. I would like to build a measure that provides the average monthly total of volunteers, so I don't have to provide a huge total i. SUMX provides the total (see visualization), while AVERAGE X returns the monthly average per provider.
For example, if November is picked in the slicer, Volunteers active (duplicated by month) returns 359 (69+129+60+101), but AVERAGEX returns 89.75 (359/4 because there are four providers). I've tried countrows and spent a good deal of time trying various different approaches, unsuccessfully. Thank you for any help you can provide.
Here are the measures I'm currently using:
Volunteer hours received by consumers =
SUMX(
FILTER('Assessment Questions',
[Question]= "# of volunteer hours received by consumers for reporting month not reported by another agency"), [Response])
All Provider Expenses =
SUMX('Invoice Expense',
'Invoice Expense'[Invoice Amount])
Hi Alexis. Is there anything you can suggest? Thisis one of what shoulb become about 15 such dashboards (for different programs) and I would really appreciate understanding how to create this measure.
Hi Alexis. Thank you for your help! I am learning DAX and may not be implementing your suggestion correctly. I tried creating a new measure using the code below but received this error: The syntax for 'RETURN' is incorrect.
That's not an error I'd expect with that code. Can you share a screenshot of your Power BI Desktop so I can check to see if you've missed something like naming the measure? (I didn't provide a name, so you'll definitely get some sort of error if you paste my code block in without adding one.)
This is my date calendar. I wasn't sure if I should use Month or Year Month in the groupBy_columnName parameter.
Hi. Yes, there is so much about DAX that I don't know, I probably have made an obvious error, or more than one. Is this what you are looking for?
The key is to aggregate at the level of granularity you need before you take an average.
Try writing your logic along these lines:
VAR _MonthlyHours_ =
SUMMARIZE ( Dates, Dates[Month], "@TotalHours", [Volunteeer hours] )
RETURN
AVERAGEX ( _MonthlyHours_, [@TotalHours] )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
11 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |