Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Table total giving wrong results even after using sumx

Hi,  To explain my data first, I have list of materials in desc_1 which have an inventory value assoiciated with them from various warehouses in the base data. For each material I have a final tag...
  • Anonymous's avatar
    Anonymous
    5 years ago

    thanks for your reply but I fiured it out. I had to declare the variable inside sumx as it was computing the variable only once adn not in each iteration.

     

    sum1 = 
    
    SUMX(SUMMARIZE(inventory,inventory[Desc_1]), var final = [final tagging]
    return
    CALCULATE(
        CALCULATE(
            SUM(inventory[As on today stock value in Cr's (mvg price)]),
            FILTER(SUMMARIZE(inventory,inventory[Desc_1]),
            final = "stn low and variation high")
        )
    )
    )