Reply
Regular Visitor
Posts: 40
Registered: ‎05-04-2017
Accepted Solution

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

 

 


Accepted Solutions
Community Support Team
Posts: 4,198
Registered: ‎07-09-2016

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.

View solution in original post


All Replies
Highlighted
Super User
Posts: 2,392
Registered: ‎09-19-2016

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
Posts: 4,198
Registered: ‎07-09-2016

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.