Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Greetings, DAX gurus. I know this is probably a fairly straightforward solution, but I can't for the life of me figure it out. Here's the scenario. I'm wanting to come up with the average for the total values for clients for each "period" of time a user is viewing (whole month, last 6 months, etc.). My data is similar to the following:
| Client | Month | Value |
| AcmeTech | 8/1/2020 | 100 |
| AcmeTech | 8/1/2020 | 50 |
| GenTech | 8/1/2020 | 50 |
| TenTech | 9/1/2020 | 10 |
| AcmeTech | 9/1/2020 | 20 |
Let's say a user is looking at 8/1/2020. I want a measure that calculates the avg. of AcmeTech's total for the month + GenTech's total for the month, which in standard math would be (150 + 50) / 2
If the period changes to, say, 6 months, I want it to update accordingly.
Any ideas?
Hi,
MyMeasure =
VAR MyTable =
SUMMARIZE ( 'Table', 'Table'[Client], "Total Value", SUM ( 'Table'[Value] ) )
RETURN
AVERAGEX ( MyTable, [Total Value] )Regards
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 17 | |
| 10 | |
| 7 | |
| 6 |