Forum Discussion

alamhaz's avatar
alamhaz
Helper I
5 years ago
Solved

adding up measures but giving wrong values

Hi good day 

I have one measure and i want to add it up using one condtion but its taking wrong values check below Screenshot.  as highlighted i should be 1 but its showing 14, same behaviour is showing in others as well but some of them are fine, 

below is the measure ss

Please if anyone can help me i tried but cannot reslove it. 

  • I figure out the solution just use follwing measure. 

    on time = Sumx(VALUES('InOutData(PAK)'[Date & Time]), IF( [test_3_FF]> 0 && [test_3_FF] <500,[test_3_FF],0))
    its working fine 

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    alamhaz Hard to say without test data but try dumping CALCULATE and moving your FILTER to the first parameter of your SUMX

    • alamhaz's avatar
      alamhaz
      Helper I

      I am getting value form test_3_FF measure which is fine but now i want to add them on one filter that it shd add value after 13 pm to 10 pm , but value is wrong which is highlighted it should be 1 which is from test_3_FF measure, but when i use sumiftest measure its giving me wrong which is 14. 

      • alamhaz's avatar
        alamhaz
        Helper I

        also i tried this measure 

        Total FF Value = IF([test_3_FF] > 0 && [test_3_FF] < 500,SUMX(VALUES('InOutData(PAK)'[Payroll #]),[test_3_FF]),0)
        result is what i need but when i sum it up with sumx its giving me same values, see ss. (on time Col) 
  • I figure out the solution just use follwing measure. 

    on time = Sumx(VALUES('InOutData(PAK)'[Date & Time]), IF( [test_3_FF]> 0 && [test_3_FF] <500,[test_3_FF],0))
    its working fine