Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
sonuojha1
Helper IV
Helper IV

How to get Max Grand total of Sales in a month ?

Hi Experts,

I have a below requirement. I need help to find the solution:

 

Granularity: The grain of data is hour.

I have a requirement to get 

1. Column Grand total ( in attached image ) each hour level.

2. Find the maximum grand total of each hour in day.

3. Find the maximum grand total in the month.

4. How can drill to detail level. ( Drill from max value on which date and time in the month)

 

Expected Result:- 

Target.png

Here, let say maximum of value  of the day on 1st-Jan-20 is 55886(grand total), recorded on 11:00 PM,

and Maximum value of the month is recorded on 24-Jan-20 on 6:00 PM.

 

Source data

 

DateTimeOrgSales
1-Jan-201:00:00ORG519000
1-Jan-201:00:00ORG210000
1-Jan-201:00:00ORG15112
1-Jan-201:00:00ORG3900
1-Jan-201:00:00ORG4500
1-Jan-202:00:00ORG519001
1-Jan-202:00:00ORG29501
1-Jan-202:00:00ORG15109
1-Jan-202:00:00ORG4500
1-Jan-203:00:00ORG519002
1-Jan-203:00:00ORG210002
1-Jan-203:00:00ORG15102
1-Jan-203:00:00ORG32700
1-Jan-203:00:00ORG4500
1-Jan-204:00:00ORG519003
1-Jan-204:00:00ORG28903
1-Jan-204:00:00ORG15107
1-Jan-204:00:00ORG33600
1-Jan-204:00:00ORG4500
1-Jan-205:00:00ORG519004
1-Jan-205:00:00ORG211004
1-Jan-205:00:00ORG15100
1-Jan-205:00:00ORG34500
1-Jan-205:00:00ORG4500
1-Jan-206:00:00ORG519005
1-Jan-206:00:00ORG210505
1-Jan-206:00:00ORG35400
1-Jan-206:00:00ORG15093
1-Jan-206:00:00ORG4500
1-Jan-207:00:00ORG519006
1-Jan-207:00:00ORG213006
1-Jan-207:00:00ORG36300
1-Jan-207:00:00ORG15154
1-Jan-207:00:00ORG4500
1-Jan-208:00:00ORG519007
1-Jan-208:00:00ORG214007
1-Jan-208:00:00ORG37200
1-Jan-208:00:00ORG15173
1-Jan-208:00:00ORG4500
1-Jan-209:00:00ORG519008
1-Jan-209:00:00ORG210008
1-Jan-209:00:00ORG38100
1-Jan-209:00:00ORG15124
1-Jan-209:00:00ORG4500
1-Jan-2010:00:00ORG519009
1-Jan-2010:00:00ORG29509
1-Jan-2010:00:00ORG39000
1-Jan-2010:00:00ORG15127
1-Jan-2010:00:00ORG4500
1-Jan-2011:00:00ORG519010
1-Jan-2011:00:00ORG210010
1-Jan-2011:00:00ORG39900
1-Jan-2011:00:00ORG15116
1-Jan-2011:00:00ORG4500
1-Jan-2012:00:00ORG519011
1-Jan-2012:00:00ORG310800
1-Jan-2012:00:00ORG28911
1-Jan-2012:00:00ORG15119
1-Jan-2012:00:00ORG4500
1-Jan-2013:00:00ORG519012
1-Jan-2013:00:00ORG311700
1-Jan-2013:00:00ORG211012
1-Jan-2013:00:00ORG15130
1-Jan-2013:00:00ORG4500
1-Jan-2014:00:00ORG519013
1-Jan-2014:00:00ORG312600
1-Jan-2014:00:00ORG210513
1-Jan-2014:00:00ORG15131
1-Jan-2014:00:00ORG4500
1-Jan-2015:00:00ORG519014
1-Jan-2015:00:00ORG313500
1-Jan-2015:00:00ORG213014
1-Jan-2015:00:00ORG15142
1-Jan-2015:00:00ORG4500
1-Jan-2016:00:00ORG519015
1-Jan-2016:00:00ORG314400
1-Jan-2016:00:00ORG214015
1-Jan-2016:00:00ORG15145
1-Jan-2016:00:00ORG4500
1-Jan-2017:00:00ORG519016
1-Jan-2017:00:00ORG315300
1-Jan-2017:00:00ORG214016
1-Jan-2017:00:00ORG15164
1-Jan-2017:00:00ORG4500
1-Jan-2018:00:00ORG519017
1-Jan-2018:00:00ORG316200
1-Jan-2018:00:00ORG210017
1-Jan-2018:00:00ORG15183
1-Jan-2018:00:00ORG4500
1-Jan-2019:00:00ORG519018
1-Jan-2019:00:00ORG317100
1-Jan-2019:00:00ORG29518
1-Jan-2019:00:00ORG15166
1-Jan-2019:00:00ORG4500
1-Jan-2020:00:00ORG519019
1-Jan-2020:00:00ORG318000
1-Jan-2020:00:00ORG210019
1-Jan-2020:00:00ORG15183
1-Jan-2020:00:00ORG4500
1-Jan-2021:00:00ORG519020
1-Jan-2021:00:00ORG318900
1-Jan-2021:00:00ORG28920
1-Jan-2021:00:00ORG15126
1-Jan-2021:00:00ORG4500
1-Jan-2022:00:00ORG319800
1-Jan-2022:00:00ORG519021
1-Jan-2022:00:00ORG211021
1-Jan-2022:00:00ORG15143
1-Jan-2022:00:00ORG4500
1-Jan-2023:00:00ORG320700
1-Jan-2023:00:00ORG519022
1-Jan-2023:00:00ORG210522
1-Jan-2023:00:00ORG15142
1-Jan-2023:00:00ORG4500
2-Jan-200:00:00ORG321600
2-Jan-200:00:00ORG519023
2-Jan-200:00:00ORG213023
2-Jan-200:00:00ORG15125
2-Jan-200:00:00ORG4500
2-Jan-201:00:00ORG322399.99
2-Jan-201:00:00ORG519024
2-Jan-201:00:00ORG214024
2-Jan-201:00:00ORG15136
2-Jan-201:00:00ORG4500
2-Jan-202:00:00ORG323299.99
2-Jan-202:00:00ORG519025
2-Jan-202:00:00ORG210025
2-Jan-202:00:00ORG15133
2-Jan-202:00:00ORG4500
2-Jan-203:00:00ORG324199.99
2-Jan-203:00:00ORG519026
2-Jan-203:00:00ORG29526
2-Jan-203:00:00ORG15126
2-Jan-203:00:00ORG4500
2-Jan-204:00:00ORG325099.99
2-Jan-204:00:00ORG519027
2-Jan-204:00:00ORG210027
2-Jan-204:00:00ORG15131
2-Jan-204:00:00ORG4500
2-Jan-205:00:00ORG325999.99
2-Jan-205:00:00ORG519028
2-Jan-205:00:00ORG28928
2-Jan-205:00:00ORG15124
2-Jan-205:00:00ORG4500
2-Jan-206:00:00ORG326899.99
2-Jan-206:00:00ORG519029
2-Jan-206:00:00ORG211029
2-Jan-206:00:00ORG15117
2-Jan-206:00:00ORG4500
2-Jan-207:00:00ORG327799.99
2-Jan-207:00:00ORG519030
2-Jan-207:00:00ORG210530
2-Jan-207:00:00ORG15178
2-Jan-207:00:00ORG4500
2-Jan-208:00:00ORG328699.99
2-Jan-208:00:00ORG519031
2-Jan-208:00:00ORG213031
2-Jan-208:00:00ORG15197
2-Jan-208:00:00ORG4500
2-Jan-209:00:00ORG329599.99
2-Jan-209:00:00ORG519032
2-Jan-209:00:00ORG214032
2-Jan-209:00:00ORG15148
2-Jan-209:00:00ORG4500
2-Jan-2010:00:00ORG330499.99
2-Jan-2010:00:00ORG519033
2-Jan-2010:00:00ORG210033
2-Jan-2010:00:00ORG15151
2-Jan-2010:00:00ORG4500
2-Jan-2011:00:00ORG331399.99
2-Jan-2011:00:00ORG519034
2-Jan-2011:00:00ORG29534
2-Jan-2011:00:00ORG15140
2-Jan-2011:00:00ORG4500
2-Jan-2012:00:00ORG332299.99
2-Jan-2012:00:00ORG519035
2-Jan-2012:00:00ORG210035
2-Jan-2012:00:00ORG15143
2-Jan-2012:00:00ORG4500
2-Jan-2013:00:00ORG333199.99
2-Jan-2013:00:00ORG519036
2-Jan-2013:00:00ORG28936
2-Jan-2013:00:00ORG15154
2-Jan-2013:00:00ORG4500
2-Jan-2014:00:00ORG334099.99
2-Jan-2014:00:00ORG519037
2-Jan-2014:00:00ORG211037
2-Jan-2014:00:00ORG15155
2-Jan-2014:00:00ORG4500
2-Jan-2015:00:00ORG334999.99
2-Jan-2015:00:00ORG519038
2-Jan-2015:00:00ORG210538
2-Jan-2015:00:00ORG15166
2-Jan-2015:00:00ORG4500
2-Jan-2016:00:00ORG335899.99
2-Jan-2016:00:00ORG519039
2-Jan-2016:00:00ORG213039
2-Jan-2016:00:00ORG15169
2-Jan-2016:00:00ORG4500
2-Jan-2017:00:00ORG336799.99
2-Jan-2017:00:00ORG519040
2-Jan-2017:00:00ORG214040
2-Jan-2017:00:00ORG15188
2-Jan-2017:00:00ORG4500
2-Jan-2018:00:00ORG337699.99
2-Jan-2018:00:00ORG519041
2-Jan-2018:00:00ORG214041
2-Jan-2018:00:00ORG15207
2-Jan-2018:00:00ORG4500
2-Jan-2019:00:00ORG338599.99
2-Jan-2019:00:00ORG519042
2-Jan-2019:00:00ORG210042
2-Jan-2019:00:00ORG15190
2-Jan-2019:00:00ORG4500
2-Jan-2020:00:00ORG339499.99
2-Jan-2020:00:00ORG519043
2-Jan-2020:00:00ORG29543
2-Jan-2020:00:00ORG15207
2-Jan-2020:00:00ORG4500
2-Jan-2021:00:00ORG340399.99

 

 

 

5 REPLIES 5
Anonymous
Not applicable

Hi @sonuojha1 ,

I'm sorry I am not very clear on  how the detailed date and time filtered based on which Orgs maximum Sale from the screenshots you gave.

 

Since the maximum Sale of each Org is at a different time point, for my test ,the Matrix visualization looks like this:

8.20.3.1.png

If the Matrix row is date+time,the drill down could not be applied, maybe you could use drill through for Sales instead.

8.20.3.2.png

Is the result what you want? If you have any questions, please upload more detailed data samples and expected output.

Please do mask sensitive data before uploading.

 

Best Regards,

Eyelyn Qin

@Anonymous  Thanks for Reply Eyelyn.

 

I am sorry , but this is not the expected result. As I mentioned, Max of grand total of all organization.

You are taking maximum value of columns, however you have to first sum the all columns value in a row and then find the maximum.

 

Regards,

Sonu

 

 

 

 

Greg_Deckler
Community Champion
Community Champion

@sonuojha1 This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
mhossain
Solution Sage
Solution Sage

@sonuojha1 

 

I think you can structure data little bit first, do the unpivoting/multirow, so you will have three columns

 

Date with time

Attribute(org1,org2 etc)

Value

 

Now you have multirow/vertical data, so you can create a measure like MAXX, try this and hope this makes sense.

@mhossainThanks for reply, Yes, I have already restructured it. I tried, but not achieved expected result.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.