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 all,
This seems like a pretty basic challenge I have. And it's driving me nuts that I can't figure it out.
Sample dataset:
I want to return the Max Date at the Project level.
However, I want it to take the filtered selection into consideration. i.e. - When I'm filtered to just Job 1, it will reflect a Max date of 1/1/22. I figured I could just do something like this and wrap an allselected around my first measure, but no dice.
Solved! Go to Solution.
My colleague was able to solve
Hi @Anonymous
Try
CALCULATE (
MAXX ( ALLSELECTED ( Sheet1[Job #] ), Sheet1[Date] ),
ALLSELECTED ( Sheet1[Project #] )
)
Thanks. But it gives me an error when I try to use Sheet1[Date]
Use MAX ( Sheet1[Date] )
Also this might work
MAXX ( ALLSELECTED ( Sheet1[Job #] ), CALCULATE ( VALUES ( Sheet1[Date] ) ) ),
ALLSELECTED ( Sheet1[Project #] )
)
I haven't tried your last one. But wanted to message that my colleuge was able to solve.
Hi,
Please try the below.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thanks for the quick repsonse, JiHwan. Yes, you are correct. That did work. And sorry, I should have included another job to throw another wrinkle into this.
I've added another job to the dataset.
What I would like to see is the Max date for each Project based on the filtered selection.
So my original formula works as long as everything is selected.
However, when I filter down to just the Jobs title '1', it doesn't. The Project 1/Job 1 is still reflecting the Max date of the Project 1/Job 2, even though it's now filtered out.
And using the second forumula will give the Max date of the entire filtered selection. However, I still want it to consider the filter context based on the Project.
Project 1/Job 1 should reflect it's own date (now that Project 1/Job 2 is filtered out). So neither of these formulas get that right. I figured it would need to be a combination of the formulas. But I'm having trouble nesting the ALL and/or CALCULATES in order to get it to work.
My colleague was able to solve
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 | |
16 | |
12 | |
9 | |
7 |
User | Count |
---|---|
38 | |
32 | |
28 | |
12 | |
11 |