The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone, I am trying to use the calculate function with multiple filters. The goal is to calculate the Score of the highest Run per year.
It's currently hardcoded like this,
Score2020 = calculate([Score],Scores[year]=2020,Scores[run]=12) [results 0.62]
Score2021 = calculate([Score],Scores[year]=2021,Scores[run]=13) [results 0.63]
Score2022 = calculate([Score],Scores[year]=2022,Scores[run]=2) [results 0.18]
But I don't want to manually enter in the Run for Score2022 as the year progresses.
This is one of my many attempts, but I get errors every time.
If you need a separate measure for each year then you could try
Score 2022 = CALCULATE( MAX(Scores[Score]), Scores[Year] = 2022 )
Or you could have it in 1 measure as
Best score = MAX( Scores[Score])
If you use a slicer on Scores[Year], or put Scores[Year] into a visual then it will filter the results for each year separately.
User | Count |
---|---|
27 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
33 | |
13 | |
11 | |
9 | |
8 |