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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MaadiKemko
Frequent Visitor

DAX - "Monthly Orders" For a Particular Customer?

 

Hi All,

 

As part of requirement, I want to create a Custom Table  (Historic Information) with below information in Power Bi Desktop. 

 

OrderDetails.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Can anyone help me to write DAX for the above mentioned columns(Monthly Order Details)?

 

I used the below option to create the table,

 

Enter Data.PNG

 

 

 

 

 

 

 

 

 

 

 

Please find the data below, 

 

Order Details

Customers

 

Let me know if you want any other information.

 

Thank in Advance,

Maadi.

2 ACCEPTED SOLUTIONS
dataX
Frequent Visitor

Perhaps give this a go over your orders table

 

New Table = SUMMARIZE(
    ADDCOLUMNS(
        'Orders',
        "Year",YEAR('Orders'[Order Date]),
        "Month",MONTH('Orders'[Ship Date])
        )
        ,
        [Year],
        [Month],
        "Orders" , COUNTROWS('Orders')
        )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
dataX
Frequent Visitor

PBI.png

Hi @dataX,

 

Thanks for you replay.

 

Is it possible the same information keep in a separate static table.

This table will act like a historic table and will use for trending.

 

I dont know how to create the table with calculated columns(Year, Month & count of Orders).

 

Let me know is it possible or not? If yes then how to do that?

 

Thanks in Advance,

Maadi.

Perhaps give this a go over your orders table

 

New Table = SUMMARIZE(
    ADDCOLUMNS(
        'Orders',
        "Year",YEAR('Orders'[Order Date]),
        "Month",MONTH('Orders'[Ship Date])
        )
        ,
        [Year],
        [Month],
        "Orders" , COUNTROWS('Orders')
        )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

This is worked for me.

Thanks @Phil_Seamark & @dataX.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.