Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Count blanks in matrix

Hi can you please help me solve my problem, 

 

I have a matrix showing the amount of times a transaction has been executed. I want to show the combination of department and days that are blank. For this store the count would be 6.

 

To help a simplified table in English.

I want to count the Departments for eacht branche, with zero transactions (marked red). 

 

Branche (table_location)Article (table_article)Department (table_article)Transactions (table_transactions)
1101134
110215
110310
110420
2101112
2102133
210313
210423
310110
310210
310310
310420

 

So the result would be:

BrancheDepartmentCountblank
110
121
210
220
311
321

 

The formula I use is the following:

 

Countblanks = calculate (
    COUNTROWS(table_article),
    Filter (table_transactions, Isblank ([Transactions])))
 
The problem is that I am filtering on the whole table_article, leading to a count on article level. So i do not see the count of 3, but 5. What I need is a count on Department level. It is probaby easy to fix, but it is already taking me hours. Please help:)

2 Replies

  • Anonymous , Try a new measure like
    Sumx(summarize(table, Table[Department], Table[Day]), calculate(if(isblank(coutrows(Table)), 1,0 )))

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak thanks for the suggestion, maybe I did not represent the table structure in the correct way, but I cannot make the measure as you suggest. I want to count the amount in table "voorraadmutaties".