March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I am trying to get my head around the below table behaviour:
Essentially I need the weekly average of the data but then also the cumulative average, this appears to be fine if I select a specific category:
However when I then include multiple categories incorrect averages are then given for both categories:
This is the DAX I am using (I convert to HH:MM:SS in a seperate measure)
This is because the ALLSELECTED removes the category context. I'd try making the ALLSELECTED more targeted by referencing just the date column rather than the whole table.
A2H_Avg_Year_To_Date =
CALCULATE (
AVERAGE ( Assignments_Detail[A2H_Secs] ),
FILTER (
ALLSELECTED ( Assignments_Detail[RespDateDestination] ),
Assignments_Detail[RespDateDestination]
<= MAX ( Assignments_Detail[RespDateDestination] )
)
)
Hi,
Thank you for you reply. Unfortunately that leads to the situation where every Week Ending column gives the same average and it basically seems like it isnt doing the cumulative bit:
Do you have any other ideas?
I'd have expected that to work if [RespDateDestination] is the column you are using for the date column headers in your visual. If it's not, then whatever dimension you are using there should be in ALLSELECTED instead.
I suppose you can approach it from the other side by adding back in the context you do want, though this isn't quite convenient if you want to use a different dimension for your row headers.
A2H_Avg_Year_To_Date =
CALCULATE (
AVERAGE ( Assignments_Detail[A2H_Secs] ),
VALUES ( Assignments_Detail[Category] ),
FILTER (
ALLSELECTED ( Assignments_Detail ),
Assignments_Detail[RespDateDestination]
<= MAX ( Assignments_Detail[RespDateDestination] )
)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |