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
Hello!
I can't find a solution for this lilttle problem.
Here is the dataset, it has Units and Performance. I want to make a calculated column with a Maximum Performance for each distinct Unit. (hardcoded here below for example purposes)
Should be smth like this:
maximum = CALCULATE(MAX(table[performance]); table[unit] = ***current unit or what...???***))
Any help is appreciated!
Solved! Go to Solution.
Hi @karimkz,
if you are using calculated column:
maximum = CALCULATE(MAX(table[performance]),filter(all(table), table[unit] = earlier(table[unit]) ) ))
(earlier/earliest will return current row in calculated column expression)
maximum =
CALCULATE (
MAX ( table[performance] ),
FILTER (
ALL (table),
table[unit] = EARLIER ( table[unit] )
)
)
Extra bracket removed. As sqlbi.com says "if its not formatted then its not dax" :}
And thank you for the construct it helped to resolve an issue.
Hi @karimkz,
if you are using calculated column:
maximum = CALCULATE(MAX(table[performance]),filter(all(table), table[unit] = earlier(table[unit]) ) ))
(earlier/earliest will return current row in calculated column expression)
What if its a measure? I want the average rate benchmark for any given bid to be calculated across all bids with that same location and job role. The approach of using EARLIER does not work within a measure.
=CALCULATE(AVERAGEX('Bids','Bids'[Hourly Rate]), FILTER(ALL('Projects'), 'Projects'[Location] = 'Projects'[Location] && 'Projects'[Job Role] = 'Projects'[Job Role]))
Did you ever figure out how to incorporate this into a Measure? I'm struggling with something similar.
Hopefully you guys figured this out, amazing how difficult to get this simple stuff done in the context of Power Pivot. I really think they should blend the functionalities of Excel and Power Pivot all together. There are things that can be done in 5 seconds in Excel, but would take 5 days to learn to how to get in PP, and vice versa.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |