The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |