Forum Discussion
Find Max Day per Week
- 6 years ago
Hi,
I think you have misunderstood my data, and the last day of each week only represents this week and the max value is not the end day's value.
So i add an column to the original table:
Week = SWITCH('Table'[WeekEnd],DATE(2020,2,8),"Week-1",DATE(2020,2,15),"Week-2",DATE(2020,2,22),"Week-3")And i think you should already have the column like the above to represent each week.
The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
Sorry, I explained this poorly.
I want to graph the highest value per work on a bar graph rather than displaying the date
Max Percentage measure =
VAR MaxYear =
CALCULATE (
MAX ( 'User Table'[Year] ),
ALLEXCEPT ( 'User Table', 'User Table'[Category] )
)
RETURN
CALCULATE (
MAX ( 'User Table'[Percentage] ),
FILTER (
ALLEXCEPT ( 'User Table', 'User Table'[Category] ),
'User Table'[Year] = MaxYear
)
)I Tried this and it didn't work as intended - only displaying the saturday value
Hi,
I add some data to my original test file.
Please try this measure:
Measure =
var a = TOPN(1,SUMMARIZE('Table','Table'[Date],"Count",COUNTROWS('Table')),MAX([Count]),DESC)
var maxDate = MAXX(a,'Table'[Date])
return
DAY(maxDate)Then choose [WeekEnd] column and this measure, the result shows:
Best Regards,
Giotto Zhi
- Anonymous6 years agoNot applicable
It's only getting the max value for the last day of the week. I'm looking to take the max per week, not just the max at the end of the week
- amitchandak6 years ago
Super User
If you are looking for only max value per week, then rank can help.
rankx(all('User Table'[Week end date]),MAX ( 'User Table'[Percentage] ),,desc,dense)
How to filter on rank:https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814
If you need a max value on the max date of the week , that is a different context
- v-gizhi-msft6 years ago
Community Support
Hi,
I think you have misunderstood my data, and the last day of each week only represents this week and the max value is not the end day's value.
So i add an column to the original table:
Week = SWITCH('Table'[WeekEnd],DATE(2020,2,8),"Week-1",DATE(2020,2,15),"Week-2",DATE(2020,2,22),"Week-3")And i think you should already have the column like the above to represent each week.
The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
- Anonymous6 years agoNot applicable
I'm still not getting correct results