I have a table that has columns of Date, Hour, Person, and 'Value'. It would look something like this.
What I want to know is what is the greatest value for each hour. The Date and Person fields above just discriminate the specific hours. So,
the output would be something like this.
What I have done so far is this;
VAR PicksTable = GROUPBY(MyTable, [Hour], [Date], [Person], "Value", SUMX(CURRENTGROUP(), IF("Some Criteria"1,0)))
This gives me a neat table like that shown at the top. A column for date, hour, person and value. (My Table has a lot more data in it that I don't need).
What I think I want my Measure to return is something like this;
MAX(PicksTable[Value])
But I cannot do this because I cannot reference the columns in my created (virtual?) table.
I am still learning DAX, but am hoping that by creating a Measure that does this, then creating a Pivot table that has a Row Context of Hour, then I will get the result I need. The Row Context could include person so I would then see which hour is their best hour.
Any help or guidance will be greatly appreciated.
Date | Hour | Person | Value |
1-Apr-2021 | 1 | Fred | 7 |
1-Apr-2021 | 1 | Joe | 9 |
1-Apr-2021 | 1 | Paul | 5 |
1-Apr-2021 | 2 | Fred | 11 |
1-Apr-2021 | 2 | Paul | 6 |
2-Apr-2021 | 2 | Joe | 13 |
What I want to know is what is the greatest value for each hour. The Date and Person fields above just discriminate the specific hours. So,
the output would be something like this.
Hour | Value (Max) |
1 | 9 |
2 | 13 |
What I have done so far is this;
VAR PicksTable = GROUPBY(MyTable, [Hour], [Date], [Person], "Value", SUMX(CURRENTGROUP(), IF("Some Criteria"1,0)))
This gives me a neat table like that shown at the top. A column for date, hour, person and value. (My Table has a lot more data in it that I don't need).
What I think I want my Measure to return is something like this;
MAX(PicksTable[Value])
But I cannot do this because I cannot reference the columns in my created (virtual?) table.
I am still learning DAX, but am hoping that by creating a Measure that does this, then creating a Pivot table that has a Row Context of Hour, then I will get the result I need. The Row Context could include person so I would then see which hour is their best hour.
Any help or guidance will be greatly appreciated.