March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a situation where my boss wants to know the date, hour and values of our generation data for each month. This is breaking my brain. We have 5 years of hourly data. Here what I envision the results looking like.
The problem I have is that instead of showing the values from the individual row (hour) the results just give the peak of each resource for the entire month. I need the values from the hour that the Peak Generation occurs each month. Not the peak of each resource for the entire month.
Solved! Go to Solution.
@heberpower can you throw sample data in a pbix file and expected output, will get back to you with the solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @heberpower
I think you want to show the max Hour per month.
You can try to build a matrix visual and use a measure filter in this visual.
My Sample:
Measure:
Measure =
VAR _MaxHourPerMonth = MAXX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),'Table'[Hour])
VAR _MaxDate = CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Hour]=_MaxHourPerMonth))
RETURN
IF(MAX('Table'[Date])=_MaxDate,1,0)
Result is as below.
Set the measure to show items when the value is 1.
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 @heberpower
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
Hi @heberpower
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
Hi @heberpower
I think you want to show the max Hour per month.
You can try to build a matrix visual and use a measure filter in this visual.
My Sample:
Measure:
Measure =
VAR _MaxHourPerMonth = MAXX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),'Table'[Hour])
VAR _MaxDate = CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Hour]=_MaxHourPerMonth))
RETURN
IF(MAX('Table'[Date])=_MaxDate,1,0)
Result is as below.
Set the measure to show items when the value is 1.
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.
I see what is happening here, you are getting the max hour per month, actually I need the row with the max Peak Generation in each month. I do not know how to do this. I really do appreciate your help!
Hi,
On a small dataset, please show the expected result.
Thanks for the idea! I think you are on the right track but when I use that measure I end with with the results from the last day of every month. Do you have any idea what I have done wrong?
@heberpower can you throw sample data in a pbix file and expected output, will get back to you with the solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
This is a small dataset
And here are the desired results. I need to retrieve 1 row for each month where the "Peak" is the MAX during that month. Like this:
Thanks!
Hi,
Share the link from where i can download your MS Excel workbook.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
91 | |
86 | |
77 | |
49 |
User | Count |
---|---|
164 | |
149 | |
101 | |
73 | |
56 |