Forum Discussion

Naveen29's avatar
Naveen29
Helper II
1 year ago
Solved

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
  • Anonymous's avatar
    Anonymous
    1 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.