Forum Discussion

tomb0's avatar
tomb0
Frequent Visitor
5 years ago

Calculate Distintcount before it Does a filter from the date slicer

the issue im running into is that if i do this measure

amount of In Time =
CALCULATE(
    DISTINCTCOUNT('AMP'[Source Handling Unit]),
    'AMP'[delay/in time]="In time"
)
in a cluster column chart with a date slicer, it wil count the distinctcount per days so that means the same Value on monday and thueseday not what i want 

what im looking for is doing my measure before the Date slicer.

is this possible if so how.  
many thanks.

4 Replies

    • tomb0's avatar
      tomb0
      Frequent Visitor

      The thing i need.

      Is this but then after the measure is done.

      i want date filter to work again.
      is this possible?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi tomb0 ,

        I'm not sure whether the following measure is what you want...

        amount of In Time =
        CALCULATE (
            DISTINCTCOUNT ( 'AMP'[Source Handling Unit] ),
            FILTER ( ALLSELECTED ( 'AMP' ), 'AMP'[delay/in time] = "In time" )
        )

        If the above one can't help you get your expected result, could you please share some sample data and your expected result with backend logic and specific examples in order to provide you a suitable solution? Thank you.

        Best Regards

  • Hi,

    Does this work?

    amount of In Time =
    CALCULATE(DISTINCTCOUNT('AMP'[Source Handling Unit]),'AMP'[delay/in time]="In time",all(Calendar[Date]))