cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaadiKemko Frequent Visitor
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

Accepted Solutions
Highlighted
dataX Frequent Visitor
Frequent Visitor

Re: DAX - "Monthly Orders" For a Particular Customer?

PBI.png

Phil_Seamark Super Contributor
Super Contributor

Re: DAX - "Monthly Orders" For a Particular Customer?

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!

4 REPLIES 4
Highlighted
dataX Frequent Visitor
Frequent Visitor

Re: DAX - "Monthly Orders" For a Particular Customer?

PBI.png

MaadiKemko Frequent Visitor
Frequent Visitor

Re: DAX - "Monthly Orders" For a Particular Customer?

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.

Phil_Seamark Super Contributor
Super Contributor

Re: DAX - "Monthly Orders" For a Particular Customer?

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!

MaadiKemko Frequent Visitor
Frequent Visitor

Re: DAX - "Monthly Orders" For a Particular Customer?

This is worked for me.

Thanks @Phil_Seamark & @dataX.

 

 

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 147 members 1,652 guests
Please welcome our newest community members: