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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Oluwatosin_12
Regular Visitor

DAX

Hello All,
 I need assitance in writing a DAX for this purpose. 

 

Table structure:

1. country, customer code, channel, date, sales value.

2. Date table.

 

Task: I want to show the count of customers that has sales in a selected month, their sales value and average value per customer. At the sametime, be able to show these metrics for the next 12 month after the selected month (MoM) for only the customers that has sales in the selected month.

Your support would be appreciated and available for any further clarification. @Sandra_ @arvindsingh802 

9 REPLIES 9
talespin
Solution Sage
Solution Sage

hi @Oluwatosin_12 

 

Please share pbix file with mock data or table with data.

Re: DAX - Microsoft Fabric Community
I would apreciate it if guide me through this task. I don't knopw how am going to share pbix file here.

Oluwatosin_12
Regular Visitor

Customer CodeGrouped ProductsType of OutletDistributor  RegionsChannelSegmentBrandCartonvalueDate
28891407Group 1Type 1Region 1Canal 1Segment 1Brand 10807/04/2022
28891407Group 2Type 1Region 1Canal 1Segment 1Brand 10816/05/2022
28891737Group 1Type 1Region 1Canal 1Segment 1Brand 10306/06/2022
28891737Group 2Type 1Region 1Canal 1Segment 1Brand 10321/12/2022
28891744Group 2Type 1Region 1Canal 1Segment 1Brand 113329/04/2022
28891876Group 3Type 2Region 1Canal 1Segment 2Brand 10323/10/2022
28891900Group 2Type 2Region 1Canal 1Segment 1Brand 10124/09/2022
28891901Group 1Type 1Region 1Canal 1Segment 1Brand 10130/04/2022
28891901Group 2Type 1Region 1Canal 1Segment 1Brand 10128/09/2022
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

WhatsApp Image 2024-03-23 at 11.51.37 PM.jpeg

That's the kind of the result I want to achieve... By analyzing subsequent sales of group of customer that has sales in the first month selected.

Sounds good.  What have you tried and where are you stuck?

 

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

I am stuck at the getting the right measure to achieve this aim. I have uploaded the data to my Power BI, created a date table and established relationship successfully. I need help with the right measure. Thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.