Forum Discussion

AnilKumar's avatar
AnilKumar
Icon for Helper II rankHelper II
6 years ago
Solved

Subtotals in power bi wrong

Hi all,

 

I have created a dax which takes parameter from another table and calculates the results(attachment). Where the sub totals are showing wrong results. 

Please share your ideas to resolve it.

 

Thanks in Advance,

Vishnu Priya

 

2 Replies

  • This multiplication

    Sum(A) * Avg(B), is the one that will cause this. this need a row context. Means a level where it can do and later Aggerated to Sum or Average

    Something like this. This averageX can me sumx. Key the group where this will happen correctly. These can be more than one column

     

    averagex(summarize(Table,Table[Key],"_1",[Sum Measure],"_2", [Avg Measure],"_3",[third meausre]),
    ([_1]* [_2])-[_3])

     

    Does the above reply helps. if you need more help make me @

    Appreciate your Kudos.