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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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