Forum Discussion

ikkew's avatar
ikkew
Advocate I
7 years ago
Solved

Wrong column totals (table)

Hi, I've been trying to display a simple table with total values but I seem to have an issue.

My totals seem to be incorrect. What could be the issue here?

Very willing to provide more info if nescecary!

 

Screenshot of table: https://imgur.com/a/aMMjFri

("Min" and "Totale jaarlijkse besparing" are wrong)

  • Can you try this for MIN:

    Min = SUMX(VALUES(Artikel[ArtikelId]), CALCULATE(SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])))

19 Replies

    • ikkew's avatar
      ikkew
      Advocate I

      I do have a measure in my table, so the problem you described in your post might be the issue.

      I'll check out your suggested solutions and come back to this later.

      Thanks in advance!

       

      Edit:

       

      I've been trying to make it work but I just can't wrap my head around how to implement the solution.

      My "Min" column is the following measure:

       

       Min = SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])

      which I tried to convert as such:

       
      MinT = IF( 
              HASONEFILTER(ArtikelM[Huidig]),
              SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid]),
              SUMX( 
                  FILTER( ArtikelM, SUM(ArtikelM[Aantal]) > 0), 
                      SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])
                  )
          )

      But it's not working out for me.
      And even if it worked, I have no idea what to do with the measure? Just replace "Min" with "MinT" in my case?

       
      • v-piga-msft's avatar
        v-piga-msft
        Resident Rockstar

        Hi ikkew,

         

        I think the total value shows the result of the measure Min, do you want to show the sum of 37408.8+27144+26805+25968+25872?

         

        If it is convenient, could you share some data sample which could reproduce your scenario so that I can copy and test.

         

        In addition, I would appreciate it if you could share your desired output.

         

        Best Regards,

        Cherry

  • themistoklis's avatar
    themistoklis
    Community Champion

    Try this:

     

    Totale jaarlijkse besparing = CALCULATE(SUMX(ArtikelM, ArtikelM[Huidig]- ArtikelM[Min])  )
    • ikkew's avatar
      ikkew
      Advocate I

      themistoklis Same as with the SUMX approach for the "Min" measure: the same result :mansad:

      • themistoklis's avatar
        themistoklis
        Community Champion

        Can you try this for MIN:

        Min = SUMX(VALUES(Artikel[ArtikelId]), CALCULATE(SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])))