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
dataX Frequent Visitor
Frequent Visitor

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

PBI.png

Highlighted
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
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.

Highlighted
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
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 237 members 2,486 guests
Please welcome our newest community members: