Forum Discussion

DeBIe's avatar
DeBIe
Icon for Post Partisan rankPost Partisan
4 years ago
Solved

How to get correct row total?

Hey all,   I've seen many posts online from people who experience this problem. I've been trying to implement other formulas to get this to work, but it isn't working for me. Please help.   I nee...
  • vojtechsima's avatar
    4 years ago

    Hi, DeBIe 
    Here's an idea but it's a bit sloppy, but you can play with the Virtual Table to adjust it to your needs:

    Income = 
    
    var Income = [Companies Original] * SUM('Table (2)'[Price])
    
    var VirtualTable = SUMMARIZE('Table (2)','Table (2)'[Year], "Income", [Companies Original] * SUM('Table (2)'[Price]))
    var GetTotal = SUMX(VirtualTable, [Income] )
    
    return IF ( HASONEFILTER('Table (2)'[Year]), Income,GetTotal)