Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have been struggling with this
I have a table of data that includes a date and 'score'. I would like a measure that returns the date that the maximum value was recorded. Using the below example, I would like the measure to return 01/02/2019. I have a measure that calculates the max value. My ultimate aim is to calculate the days between the best score and today so I can have a 'days since best score' visual.
Date Score
01/01/2019 3
01/02/2019 5
01/03/2019 1
01/04/2019 2
01/05/2019 3
01/06/2019 4
thanks in advance,
Mark
Solved! Go to Solution.
Hi @markhomer ,
I created a measure to calculate the date difference between the date of maximum score(01/02/2019) and today(10/9/2019) and I put the results into a card visual. You can have a try.
days since best score = var a = MAX('Table'[Score]) var b = CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[Score] = a)) return DATEDIFF(b,TODAY(),DAY)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @markhomer ,
I created a measure to calculate the date difference between the date of maximum score(01/02/2019) and today(10/9/2019) and I put the results into a card visual. You can have a try.
days since best score = var a = MAX('Table'[Score]) var b = CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[Score] = a)) return DATEDIFF(b,TODAY(),DAY)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |