Forum Discussion

juhoneyighot's avatar
juhoneyighot
Icon for Helper III rankHelper III
1 year ago
Solved

DAX Formula for SUm with Filters

Hello! I need help with this Formula that I am working on. Result is turning all to zero. I need to get the sum of the amount on this column (Facts Single) with the following conditions: 1. ...
  • Bibiano_Geraldo's avatar
    1 year ago

    Hi juhoneyighot ,
    Instead of CONTAINS use CONTAINSSTRING function, try to use this DAX code:

    TotalAmount = 
    CALCULATE(
        SUM('Facts Single'[Amount]),
        CONTAINSSTRING('LookupLegacyTranstype'[ColumnName], "INVOICE"),
        'Facts Single'[FH_CurrentYN] = "Yes",
        'Facts Single'[FH_Type] = "28 Legacy AS Transactions",
        'Facts Single'[GL Account Category] = "400 SALES"
    )

     

    You can lear more about CONTAINSSTRING HERE 

    And more about CONTAINS HERE