Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Filter Matrix table to exclude zero balances

Hey Guys

 

I created this Matrix table that shows outstanding debtor balances as an aged analysis. 

 

I don't want to show debtors with a zero balance. 

 

Been struggling to get it right in DAX - any help would be appreciated.

 

Sample below - there are debtors with negative balances as well.

 

 

Cheers

 

D

 

10 Replies

  • Anonymous , Create a measure like this and use that in the visual level filter. Check <>  0

     

    measure = calculate([meausre], filter(allseleceted(Table), Table[Brand] = max(Table[Brand]) && Table[Customer No] = max(Table[Customer No])))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey Amitchandak

       

      Still a little lost with this one......

       

      Below is a copy of my fields panel:

       

      2 x tables, a measure and a column involved

       

      The measure at the top (#Customer Balance) is the one that I am busy with but not quite there yet 😞

       

       

       

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      Just FYI

       

      Detail of the #Receivable per group Mixed measure:

       

      #Receivables Per Group Mixed =
      CALCULATE('Detail Customer Ledger'[#Invoice Values],
      FILTER('Detail Customer Ledger',
      COUNTROWS(
      FILTER('Aged Debtor Groups',
      'Detail Customer Ledger'[#Days Overdue Mixed] >= 'Aged Debtor Groups'[Min] &&
      'Detail Customer Ledger'[#Days Overdue Mixed] <= 'Aged Debtor Groups'[Max] ) ) > 0 ) )
      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , if you want to filter a measure in a measure the you need values for one visual group  by or summarize for more than one

         

        example measure =
        Var _1 = calculate(COUNTROWS(
        FILTER('Aged Debtor Groups',
        'Detail Customer Ledger'[#Days Overdue Mixed] >= 'Aged Debtor Groups'[Min] &&
        'Detail Customer Ledger'[#Days Overdue Mixed] <= 'Aged Debtor Groups'[Max] ) ))
        return
        Sumx(filter( ADDCOLUMNS (Summarize ( 'Aged Debtor Groups'' , 'Aged Debtor Groups'[Brand] , 'Aged Debtor Groups''[Customer No]) ,
        "_measure", _1 ) , _measure >0), [#Invoice Values])

         

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for your quick reply Amitchandak - will check it out and reply real soon.