Forum Discussion
Dax
I would like to create a report something like as:
My database data like this:
| Customer ID | Customer creation date | Order date | Order Number |
- Anonymous1 year ago
Hi Naveen29 ,
Based on your description, I created this data and a date table.
You can then create these measures.
CustomersCreated = CALCULATE ( COUNT ( 'Table'[Customer ID] ), FILTER ( ALL ( 'Table' ), MONTH ( 'Table'[Customer creation date] ) = 1 ) )MEASURE = CALCULATE ( COUNT ( 'Table'[Customer ID] ), FILTER ( ALL ( 'Table' ), MONTH ( 'Table'[Customer creation date] ) = 1 && MONTH ( 'Table'[Order date] ) = MONTH ( MAX ( 'DAX DateTable'[Date] ) ) ) )Measure 2 = DIVIDE('Table'[MEASURE],'Table'[CustomersCreated])If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- dharmendars007Memorable Member
Hello Naveen29 ,
Can you please elaborate the logic you are to build in this table and expected result, this will help us to check further on the query..
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!
Thank You
Dharmendar S
- Naveen29Helper II
dharmendars007 - There are new customers created everymonth , how they were purchasing after that. Example : If customer A created in Jan,2024 and how the same customer purchasing . It is ideally understand pattern of purchasing % vs number of customers created.
- AnonymousNot applicable
Hi Naveen29 ,
Based on your description, I created this data and a date table.
You can then create these measures.
CustomersCreated = CALCULATE ( COUNT ( 'Table'[Customer ID] ), FILTER ( ALL ( 'Table' ), MONTH ( 'Table'[Customer creation date] ) = 1 ) )MEASURE = CALCULATE ( COUNT ( 'Table'[Customer ID] ), FILTER ( ALL ( 'Table' ), MONTH ( 'Table'[Customer creation date] ) = 1 && MONTH ( 'Table'[Order date] ) = MONTH ( MAX ( 'DAX DateTable'[Date] ) ) ) )Measure 2 = DIVIDE('Table'[MEASURE],'Table'[CustomersCreated])If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.