Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DistinctCount with selected Filters in Filters Pane

Hello,

 

I have a measure with distinctcount. When I select a part of a bar chart visual or select a filter in the righthand filters pane, the measure does not perform the distinctcount on the selected values. 

 

EventCount=Calculate(DistinctCount('tickettable'[ticketnumber]))+0

 

Any thoughts/ideas...thank you!

  • Anonymous's avatar
    Anonymous
    3 years ago

    Sharing in case others need help .. I just had to add the following to get it to work:

     

    EventCount=Calculate(DistinctCount('tickettable'[ticketnumber]),ALLSELECTED('tickettable'))+0

     

    Thank you!

     

     

2 Replies

  • hi Anonymous 

    how does the selected column related to the ticketnumber column?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Sharing in case others need help .. I just had to add the following to get it to work:

     

    EventCount=Calculate(DistinctCount('tickettable'[ticketnumber]),ALLSELECTED('tickettable'))+0

     

    Thank you!