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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

What is meant with "Summarizing" here?

Hi!

 

Suppose I am given the following table named Orders:

 

Orders.png

 

What is meant by

"Summarizing Orders by the CustomerID, OrderID and OrderDate columns"?

(Found this  here in Question#35)

 

Does this simply mean to apply the DAX-forumula SUMMARIZE, i.e., 

 

SUMMARIZE(Orders, Orders[CustomerID], Orders[OrderID], Orders[OrderDate])?

 

Best

5 REPLIES 5
Greg_Deckler
Super User
Super User

@Anonymous That's how I read it but you probably want something like this:

SUMMARIZE(Orders, Orders[CustomerID], Orders[OrderID], Orders[OrderDate], "UnitPrice",AVERAGE(Orders[UnitPrice]),"Quantity",SUM(Orders[Quantity]),"Discount",SUM(Orders[Discount]),"SalesTotal",SUM(Orders[SalesTotal]))

@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler Thank you for your answer.

 

Why do I have to aggregate all the other original columns?

@Anonymous Well, you don't have to but then you just wind up with a table with three columns and I'm not sure that tells you much. In actuality, you would only need to aggregate the Sales Total column when summarizing (or using Group By in Power Query). I would answer the questions, Yes, No and Yes btw. You could also ditch the Quantity column if all you care about is Total Sales.


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler Regarding the linked question, I am really not sure about the correct answers.

 

As to the first, I do not know what they mean (and this is why I asked this question). If it is meant as you read and suggest, why does this make the answer yes? Why does this reduce the model size for instance?

 

 

@Anonymous Well, with the provided example data, it wouldn't reduce the overall dataset size. But, one would have to imagine that there are orders from the same customer on the same date that would include multiple products and thus grouping or summarizing the table would result in a smaller dataset. But, if every product ordered results in a new OrderID then that wouldn't be the case. The question sucks pretty much IMHO. Vague.


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.