Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Distinct count - multiple filters

Dear all!   I have a database with multiple columns, which for my issue only 3 are relevant: - Reference document number - Date - Quantities sold.   I want to be able to write a DAX formulas t...
  • v-luwang-msft's avatar
    4 years ago

    Hi Anonymous ,

    Test the below:

    Transactions_CY_MTD = 
    TOTALMTD (
        CALCULATE (
            DISTINCTCOUNT ( 'KE31'[Reference document] ),
            FILTER ( KE31,[quantities] >0 )
        ),
        'Date Table'[Date]
    )

    Output result:

     

    If not incorrect ,could you pls show me what output you want?

     

     

    Best Regards

    Lucien