Forum Discussion
Anonymous
7 years agoNot applicable
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
Anonymous ,
You may refer to the DAX below.
Table = SUMMARIZECOLUMNS ( data[Datetime].[Date], data[Product], data[ProductCategory], "Amount", SUM ( data[SalesAmount] ) )
2 Replies
- MFelixSuper User
Hi Anonymous ,
Can you share some sample data and expected result?
Regards
MFelix
- v-chuncz-msftCommunity Support
Anonymous ,
You may refer to the DAX below.
Table = SUMMARIZECOLUMNS ( data[Datetime].[Date], data[Product], data[ProductCategory], "Amount", SUM ( data[SalesAmount] ) )