Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

IF SUM dax issue

Hi,

 

Can someone help me with this situation I am confronting with?

 

Based on the raw data on the left, I need to reach to the result on the right, but IF(SUM) is not evaluating correctly. What I am missing? What is the right DAX to properly evaluate my condition? (I need to see if the sum is above/equal/below a certain threshold I will define).

 

Thanks!

  • Hi Anonymous ,

    I think you already have your own answer.  

    You can create the matrix like above from what you already have.  

    Best regards,

     

12 Replies

  • Hi Anonymous ,

    You can create a calculated column like below, to get your required output, but I am wondering why your final output required does not have entry 4.  Is there any particular reason for this?  

    Best regards,

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi DataNinja777 ,

       

      Exactly, the result you are showing me is exactly my concern, for Apples. For some reason PBi is not aggregating in Apples's case (and other similar entries) and spliting the evaluation into two. I need to display:

       

      - Apples -> "rest" (because all the Apple entries add up to "44" which is greater than "15")

       

      I need to evaluate whether the aggregation of each type of fruit is greater/equal/less than whatever number I define in the IF formula.

       

      PS: my mistake I did not mention that "Count" is a column of numerical values. Those numbers are just numbers, values defined for each entry.

       

      Thanks!

    • Anonymous's avatar
      Anonymous
      Not applicable

      DataNinja777 ,

       

      Seems I am getting this error now 

      Am I doing something wrong?

      • DataNinja777's avatar
        DataNinja777
        Icon for Super User rankSuper User

        Hi Anonymous 

        That formula is table function so please click "New Table" as shown in the yellow highlighted circle below:

        Best regards,