Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Distinct count based on date field and Presentation Used

Hi Experts

 

Based on the sample data below i want to work out the number of time a presentation has been used over the distinctcount date value..

I believe the answer to the below is 3.

 

DatePresentation Name
01/01/2022Presentation 1
01/01/2022Presentation 1
01/02/2022Presentation 1
01/02/2022Presentation 1
01/02/2022Presentation 1
01/03/2022Presentation 1
01/03/2022Presentation 1
  • Hi Anonymous 

     

    You can achieve this by using the following measure:

     

    Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Date] ) , ALLEXCEPT ( 'Table' ,'Table'[Presentation Name] ) )

     

    It uses distinctount on the Date and filters out everything other than the Presentation Name.

     

    A PBIX has been attached for additional assistance.

     

    All the best!

    Theo 🙂

     

1 Reply

  • TheoC's avatar
    TheoC
    Community Champion

    Hi Anonymous 

     

    You can achieve this by using the following measure:

     

    Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Date] ) , ALLEXCEPT ( 'Table' ,'Table'[Presentation Name] ) )

     

    It uses distinctount on the Date and filters out everything other than the Presentation Name.

     

    A PBIX has been attached for additional assistance.

     

    All the best!

    Theo 🙂