Forum Discussion

Sudbrl's avatar
Sudbrl
Frequent Visitor
3 years ago
Solved

Need help on correcting pivot table total-dax/power pivot

I am new to Dax and power pivot and need help with a measure. From the Table below, I have managed to create a measure for finding the max of sum of sales by product and Name. =maxx(SUMMARIZE(Table1,Table1[Name],Table1[Product],"Sum",[Sum of Sales]),[Sum]).

But I could not correct the total of max sales. The correct sum on the pivot should be 22,000, not 12,000. Can you please suggest the correct Dax measure to achieve this? I could not correct this through Hasonfilter.

Pivot:

 

 

Table:

Name    Product    Sales

AnilAA7000
AnilBB7000
AnilBB4000
AnilAA3000
AnilAA2000
SunilAA6000
SunilBB7000
SunilAA4000
SunilBB3000
  • Hi Sudbrl 
    Please try

    Maximum Sales by Product =
    SUMX (
        VALUES ( Table1[Name] ),
        CALCULATE (
            MAXX (
                VALUES ( Table1[Product] ),
                [Sum of Sales]
            )
        )
    )

4 Replies