cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
joaosantos Regular Visitor
Regular Visitor

Calculate Table/SummarizeColumns grouping by date

Hello, I want to export via Dax Studio the following data structure

 

Day|Product|ProductCategory|SalesAmount

 

My original data has Datetime|Product|ProductCategory|SalesAmount

 

Can I perform a groupby with a summarizecolumns to retrieve the sales by day without creating any new columns?

 

I tried something like this, but it doesnt work

 

EVALUATE
GROUPBY( SUMMARIZECOLUMNS( "Date",INT(data[Datetime]), data[Product], data[ProductCategory]), "SlsAmount",CALCULATE(SUM(data[SalesAmount)) )
[Date],
[Product],
[ProductCategory]

 

Ty,

João

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Calculate Table/SummarizeColumns grouping by date

@joaosantos ,

 

You may refer to the DAX below.

Table =
SUMMARIZECOLUMNS (
    data[Datetime].[Date],
    data[Product],
    data[ProductCategory],
    "Amount", SUM ( data[SalesAmount] )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Super User
Super User

Re: Calculate Table/SummarizeColumns grouping by date

Hi @joaosantos ,

 

Can you share some sample data and expected result?

 

Regards

 

MFelix



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




Community Support Team
Community Support Team

Re: Calculate Table/SummarizeColumns grouping by date

@joaosantos ,

 

You may refer to the DAX below.

Table =
SUMMARIZECOLUMNS (
    data[Datetime].[Date],
    data[Product],
    data[ProductCategory],
    "Amount", SUM ( data[SalesAmount] )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.