Forum Discussion

bhmiller89's avatar
bhmiller89
Helper V
9 years ago

Help with COUNT

I'm trying to determine how many opportunities had a "same day turnaround." 

 

I have a calculated column called "Days in queue" which is a datediff. 

 

Then I wrote a measure: #SameDayTurn = CALCULATE(COUNTA('dpmgr vwJMWebSalesEngQueue'[OpportunityID]), 'dpmgr vwJMWebSalesEngQueue'[DaysInQueue] = 0)    to count how many opportunities had a same day turnaround ( 0 days in queue).

 

To test the math, I created a table and filtered by the opps with same day turnaround.  Problem is, the table isn't only showing Opportunities with "DaysinQueue = 0" 

 

Am I missing something? 

2 Replies

  • Sean's avatar
    Sean
    Community Champion

    I don't see a problem with the formula...

     

    #SameDayTurn =
    CALCULATE (
        COUNTA ( 'dpmgr vwJMWebSalesEngQueue'[OpportunityID] ),
        'dpmgr vwJMWebSalesEngQueue'[DaysInQueue] = 0
    )

    How and what did you filter?

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi bhmiller89,

     

    According to your description, you have created a measure to count how many opportunities had a same day turnaround, and place this measure to a table visual. You only want to display Opportunities with "DaysinQueue = 0" in a table visual, right?

     

    In your scenario, you can place the field [OpportunityID], [DaysInQueue] and the measure to the table visual, then add a visual level filter to filter table data. See:

     

    1. Sample data:

     

     

    2. Before add filter:

     

     

    3. After add Visual level filter:

     

     

     

    Best Regards,
    Qiuyun Yu