Forum Discussion

Patelnitya's avatar
Patelnitya
Frequent Visitor
10 years ago
Solved

Incorrect Row and Column Totals

Hello,    I am having some trouble with the following situation.    I have two tables that i am pulling data from. One table is from SQL from my erp system and the other one is from an excel file...
  • BhaveshPatel's avatar
    10 years ago

    Hi Nitya

     

    You can use SUMX function to solve your problem. It is called the iterator function in PBI and iterates through each row of the table and perform the calculation accordingly. 

    Create a measure like this 

    Cost of Goods on Hand(measure):=
    SUMX (
        StkItem,
        StkItem[Qty_On_Hand]*StkItem[NewColumn.Cost])

     

    Thanks & Regards,

    Bhavesh