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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Export the result of the dax as a new table

Hello

I have some data and have built many DAX measures for different analyses on them. I want to export the results of my measurements to a new table monthly. The following is an example of a simple job:

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 that I have a DAX measure to add the sale per month (SUM(raw[sale]). I want to generate the result of this measure in a new table and each row represents one month (for example, the start of the month is good for me):

output table:

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

How do I do that export in a new table?

Thank you.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Syndicate_Admin ,

Try two table , Table 4 you need

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Please try to use the following formula to create a new table:

New Table =
ADDCOLUMNS (
    DISTINCT (
        SELECTCOLUMNS (
            'Table',
            "start of month", DATE ( [Date].[Year], [Date].[MonthNo], 1 )
        )
    ),
    "sum of sale",
        VAR _mon =
            MONTH ( [start of month] )
        RETURN
            CALCULATE (
                SUM ( 'Table'[Sale] ),
                FILTER ( 'Table', 'Table'[Date].[MonthNo] = _mon )
            )
)

The final output is shown below:

3.5.1.new table.PNG

Here is the pbix file.

 

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

amitchandak
Super User
Super User

@Syndicate_Admin ,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

@Syndicate_Admin ,

Try two table , Table 4 you need

 

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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.