Forum Discussion

Atif's avatar
Atif
Resolver I
5 years ago
Solved

Issue with SUMX

DIVIDE( SUM(Table1[Purchase Value]), SUMX(ALL(Table1), Table1[Purchase Value]))
 
The above formula works fine without any filters. Since I am using ALL function, the filtered numerator still gets divided by the sum of all values.
  • Atif's avatar
    Atif
    5 years ago

    Thank you, sanalytics !

     

    A minor tweaking and it worked.
     
    DIVIDE( SUM(Table1[Purchase Value]), CALCULATE(SUM(Table1[Purchase Value]), ALL(Table1[Brand])))

2 Replies

  • Atif ..
    Please upload your power bi model and dummy data so that we can have a look..
    Regards,

    sanalytics

     

    • Atif's avatar
      Atif
      Resolver I

      Thank you, sanalytics !

       

      A minor tweaking and it worked.
       
      DIVIDE( SUM(Table1[Purchase Value]), CALCULATE(SUM(Table1[Purchase Value]), ALL(Table1[Brand])))