Forum Discussion

hdelfis's avatar
hdelfis
Frequent Visitor
4 years ago
Solved

How to simulate a final result with only the selected values

Hi guys!  I've trying to create a "simulation" where I select an item in a list and its sums up to my final result...    Keep values: Opportunity Type Value Weighted Gross Margin % O42...
  • v-xiaotang's avatar
    4 years ago

    Hi hdelfis 

    Thanks for reaching out to us.

    >> I've trying to create a "simulation" where I select an item in a list and its sums up to my final result... 

    Actually your needs can be summed up as dynamically creating tables, however this is not possible. As a workaround, you can try this, please make sure the column names in 2 tables are same.

    MTest_sum = 
    var _t1=ALLSELECTED(Table2)
    var _t2=UNION(_t1,Table1)
    return SUMx(_t2,[Value])
    MTest_Weighted Gross Margin% = 
    var _t1=ALLSELECTED(Table2)
    var _t2=UNION(_t1,Table1)
    return AVERAGEX(_t2,[Weighted Gross Margin %])
    

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.