The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I have a measure MaxSpeed90 already calculating 90% of a players max speed ever achieved, and I am collecting a max speed for the training sessions for individuals on a daily basis in a 'MaxSpeed' column. I am trying to calculate how many days it has been since that MaxSpeed90 number has been hit within the training data set of my 'maxspeed' column, but am struggling to get the end format into days whilst also figuring out the DAX to get to that end result. Any help would be greatly appreciated.
Thanks
Solved! Go to Solution.
Hi @jordanwhite16 ,
Due to I don't know your data model, I create a sample to have a test.
Max Speed = CALCULATE(MAX('Table'[Speed]),ALLEXCEPT('Table','Table'[Player]))
Count Days after Max Speed =
VAR _MAXSPEEDDAY = CALCULATE(MAX('Table'[Date]),FILTER(ALLEXCEPT('Table','Table'[Player]),'Table'[Speed] = [Max Speed]))
RETURN
CALCULATE(COUNT('Table'[Date]),FILTER(ALLEXCEPT('Table','Table'[Player]),'Table'[Date]>_MAXSPEEDDAY))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jordanwhite16 ,
Due to I don't know your data model, I create a sample to have a test.
Max Speed = CALCULATE(MAX('Table'[Speed]),ALLEXCEPT('Table','Table'[Player]))
Count Days after Max Speed =
VAR _MAXSPEEDDAY = CALCULATE(MAX('Table'[Date]),FILTER(ALLEXCEPT('Table','Table'[Player]),'Table'[Speed] = [Max Speed]))
RETURN
CALCULATE(COUNT('Table'[Date]),FILTER(ALLEXCEPT('Table','Table'[Player]),'Table'[Date]>_MAXSPEEDDAY))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
15 | |
14 | |
10 | |
7 |