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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Export the result of dax as a new table

Hi 

 

I have some data and I have built many DAX measures for different analysis on them. I want to export the results of my measures into a new table in a monthly basis. The following is a simple working example:

 

raw data:

 

datesale
2020-01-151
2020-01-195
2020-01-212
2020-01-294
2020-02-012
2020-02-042
2020-02-063
2020-02-145
2020-02-191
2020-02-252
2020-03-016
2020-03-051
2020-03-104
2020-03-205
2020-03-252
2020-04-013
2020-04-102
2020-04-154
2020-04-192
2020-04-259

 

Now, imagine I have a DAX measure to sum sale per month (SUM(raw[sale]). I want to output the result of this measure into a new table and each row represents one month (for example start of month is good for me):

 

output table:

 

start of monthsum of sale
2020-01-0112
2020-01-0215
2020-01-0318
2020-01-0420

 

How can I do such export into a new table?

Thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , pbix with date table  . Table 2 ( From Table and Date) . Table 2 ( From Table and Date) 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can use the following calculated table based on your sample data:

 

table2 = SUMMARIZE(SELECTCOLUMNS('Table',"start of month",DATE(YEAR('Table'[date]),MONTH('Table'[date]),1)),[start of month],"sum of sales",CALCULATE(SUM('Table'[sale]), FILTER('Table',MONTH('Table'[date])= MONTH([start of month])&&YEAR('Table'[date])=YEAR([start of month]))))

 

Capture1.PNG

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@Anonymous , pbix with date table  . Table 2 ( From Table and Date) . Table 2 ( From Table and Date) 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Anonymous , New table

 

SUMMARIZE(SELECTCOLUMNS('Table',"Month" , EOMONTH('Table'[date],-1)+1 , "Sales",SUM('Table'[sale])),[Month],"sales",SUM('Table'[sale]))

 

Try two table

 

Table 3 = SELECTCOLUMNS('Table',"Month", EOMONTH([date],-1)+1, "sale",'Table'[sale])

Table 4 = SUMMARIZE('Table 3','Table 3'[Month],"sales",SUM('Table 3'[sale]))

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.