Forum Discussion
Anonymous
2 years agoNot applicable
Counting Rows with no records
I'm trying to create a void report that shows records that have no sales. My issue is that some records that have no sales have no records so it will be blank.Is there a better way to count Blank...
parry2k
2 years agoSuper User
Anonymous try this:
Count Without Sales =
VAR __TablesWithSales =
ADDCOLUMNS (
CROSSJOIN (
VALUES ( 'Dim Store'[Store #],
VALUES ( 'Dim Product'[Nat_UPC],
VALUES ( 'Date Table'[FW Week]
),
"@CountFact", CALCULATE ( COUNTROWS ( FactTable ) )
)
RETURN COUNTX ( FILTER ( __TablesWithSales , [@CountFact] == BLANK ( ) ), 1 )