Forum Discussion

depple's avatar
depple
Helper III
7 years ago
Solved

Count Blanks Table

Hi,    I have a dataset with a table containing all stores and another table with sales. Not all stores have sales. How do I count the number of stores with no sales? I have looked into the COUNTBL...
  • jdbuchanan71's avatar
    7 years ago

    If you have a measure that calculates sales.

    Sales = SUM ( 'Table B'[qty] )

    You can use that in a COUNTROWS measure over your stores

    No Sales = 
    CALCULATE(
        COUNTROWS( 'Table A' ),
        FILTER(
            'Table A',
            [Sales] = 0
        )
    )