Forum Discussion

sraj's avatar
sraj
Icon for Responsive Resident rankResponsive Resident
6 years ago

balance with condition

Balance = SUM(vendorDTLPAY2_view[Amount (LCY)]) - SUM(vendorDTLPO2_view[Amount])​

Trying to add a condition to the measure above.  Need this field "vendorDTLPAY2_VIEW[AMOUNT (LCY)]" to pick only values that are less than 0.00.

 

Please advise.

 

Thanks!

10 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Hi sraj 

    try

    Balance = CALCULATE(SUM(vendorDTLPAY2_view[Amount (LCY)]),vendorDTLPAY2_view[Amount (LCY)]<0) - SUM(vendorDTLPO2_view[Amount])​

     

    do not hesitate to give a kudo to useful posts and mark solutions as solution

    • sraj's avatar
      sraj
      Icon for Responsive Resident rankResponsive Resident

      Hi AZ38,

       

      Thanks for responding!! 

       

      I seeing this message "TO USE SPECIAL CHARACTERS IN A MEASURE NAME, ENCLOSE THE ENTIRE NAME IN BRACKETS ([]) AND ADD A ] TO ANY CLOSING BRACKETS IN THE NAME" , I am trying to copy and paste what you have but it just giving me this message....am I missing something?

      • Anonymous's avatar
        Anonymous
        Not applicable
        Instead of copy paste try to write measure by yourself so that you will not miss any syntax or parenthesis.

        Thanks
        Pravin