Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Sum distinct values based on string values

    Posted Apr 29, 2022 06:19 AM
    Hi All,
    Can I get some help in creating a DAX formula

    I am trying to sum the distinct values of column amount based on state and invoice_status columns. state should be "quote" and invoice_status should be "no"

    Answer is 600

    Thanks for your help.
    sum distinct values


    ------------------------------
    Suresh Sonti
    Accountant
    Hyderabad
    ------------------------------


  • 2.  RE: Sum distinct values based on string values

    Posted Apr 29, 2022 11:46 PM
    Edited by Vilmar Santos Apr 29, 2022 11:47 PM
    Veja se ajuda
    zMedida = 
    CALCULATE (
        SUMX ( VALUES ( Tabela[amount] ), [amount] ),
        Tabela[state] = "quote",
        Tabela[invoice_status] = "no"
    )​


    ------------------------------
    Vilmar Santos
    ------------------------------



  • 3.  RE: Sum distinct values based on string values

    Posted May 01, 2022 01:36 AM
    Hi Vilmar,
    Really appreciate your help. The DAX function worked great.

    Thanks again

    ------------------------------
    Suresh Sonti
    Accountant
    Hyderabad
    ------------------------------