Forum Discussion
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 % |
| O4259 | Commit | 950000.00 | 25.00% |
| O4260 | Commit | 60000.00 | 23.00% |
| TOTAL | 1010000.00 | 24.88% |
Select to simulate (red):
| Opportunity | Type | Value | Weighted Gross Margin % |
| O710 | Target | 5200000.00 | 23.00% |
| O4262 | Target | 250000.00 | 23.00% |
Final Result:
| Opportunity | Type | Value | Weighted Gross Margin % |
| O4259 | Commit | 950000.00 | 25.00% |
| O4260 | Commit | 60000.00 | 23.00% |
| O710 | Target | 5200000.00 | 23.00% |
| TOTAL | 6210000.00 | 23.31% |
I've look for it across the community, but haven't found nothing similiar.
Could you please help me figure it out?
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.
3 Replies
- v-xiaotang
Community Support
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.
- v-xiaotang
Community Support
- hdelfisFrequent Visitor
Ashish_Mathur Could you help me? is there anything i could do to make more easy for you guys to help me?