Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I'm looking to sum the value of a table but still have it relative to the year and vendor code. Currently I can only get it relative to one column, but finding it difficult to do two. The result would be the column in blue below.
| Vendor Code | Description | Concat | Year | Value | Result |
| MA33C4 | accountsreceivable | MA33C4accountsreceivable | 2021 | 1774 | 14194 |
| MA33C4 | accountsreceivable | MA33C4accountsreceivable | 2020 | 1501 | 13904 |
| MA33C4 | accountsreceivable | MA33C4accountsreceivable | 2019 | 1103 | 10484 |
| MA33C4 | accountsreceivable | MA33C4accountsreceivable | 2018 | 4615 | 20214 |
| MA33C4 | accountsreceivable | MA33C4accountsreceivable | 2017 | 6852 | 20017 |
| MA33C4 | accountsreceivable | MA33C4accountsreceivable | 2016 | 1827 | 10004 |
| MA33C4 | accountspayable | MA33C4accountspayable | 2021 | 1094 | 14194 |
| MA33C4 | accountspayable | MA33C4accountspayable | 2020 | 1697 | 13904 |
| MA33C4 | accountspayable | MA33C4accountspayable | 2019 | 2144 | 10484 |
| MA33C4 | accountspayable | MA33C4accountspayable | 2018 | 3498 | 20214 |
| MA33C4 | accountspayable | MA33C4accountspayable | 2017 | 3624 | 20017 |
| MA33C4 | accountspayable | MA33C4accountspayable | 2016 | 1109 | 10004 |
| MA33C4 | revenue | MA33C4revenue | 2021 | 1480 | 14194 |
| MA33C4 | revenue | MA33C4revenue | 2020 | 1502 | 13904 |
| MA33C4 | revenue | MA33C4revenue | 2019 | 1002 | 10484 |
| MA33C4 | revenue | MA33C4revenue | 2018 | 7624 | 20214 |
| MA33C4 | revenue | MA33C4revenue | 2017 | 5489 | 20017 |
| MA33C4 | revenue | MA33C4revenue | 2016 | 4850 | 10004 |
| MA33C4 | costofgoods | MA33C4costofgoods | 2021 | 9846 | 14194 |
| MA33C4 | costofgoods | MA33C4costofgoods | 2020 | 9204 | 13904 |
| MA33C4 | costofgoods | MA33C4costofgoods | 2019 | 6235 | 10484 |
| MA33C4 | costofgoods | MA33C4costofgoods | 2018 | 4477 | 20214 |
| MA33C4 | costofgoods | MA33C4costofgoods | 2017 | 4052 | 20017 |
| MA33C4 | costofgoods | MA33C4costofgoods | 2016 | 2218 | 10004 |
| RQ020G | accountsreceivable | RQ020Gaccountsreceivable | 2021 | 0 | 0 |
| RQ020G | accountsreceivable | RQ020Gaccountsreceivable | 2020 | 1009 | 11802 |
| RQ020G | accountsreceivable | RQ020Gaccountsreceivable | 2019 | 1903 | 12597 |
| RQ020G | accountsreceivable | RQ020Gaccountsreceivable | 2018 | 1566 | 11546 |
| RQ020G | accountsreceivable | RQ020Gaccountsreceivable | 2017 | 1083 | 13891 |
| RQ020G | accountsreceivable | RQ020Gaccountsreceivable | 2016 | 0 | 0 |
| RQ020G | accountspayable | RQ020Gaccountspayable | 2021 | 0 | 0 |
| RQ020G | accountspayable | RQ020Gaccountspayable | 2020 | 4307 | 11802 |
| RQ020G | accountspayable | RQ020Gaccountspayable | 2019 | 2743 | 12597 |
| RQ020G | accountspayable | RQ020Gaccountspayable | 2018 | 2272 | 11546 |
| RQ020G | accountspayable | RQ020Gaccountspayable | 2017 | 2397 | 13891 |
| RQ020G | accountspayable | RQ020Gaccountspayable | 2016 | 0 | 0 |
| RQ020G | revenue | RQ020Grevenue | 2021 | 0 | 0 |
| RQ020G | revenue | RQ020Grevenue | 2020 | 3582 | 11802 |
| RQ020G | revenue | RQ020Grevenue | 2019 | 4239 | 12597 |
| RQ020G | revenue | RQ020Grevenue | 2018 | 4000 | 11546 |
| RQ020G | revenue | RQ020Grevenue | 2017 | 5325 | 13891 |
| RQ020G | revenue | RQ020Grevenue | 2016 | 0 | 0 |
| RQ020G | costofgoods | RQ020Gcostofgoods | 2021 | 0 | 0 |
| RQ020G | costofgoods | RQ020Gcostofgoods | 2020 | 2904 | 11802 |
| RQ020G | costofgoods | RQ020Gcostofgoods | 2019 | 3712 | 12597 |
| RQ020G | costofgoods | RQ020Gcostofgoods | 2018 | 3708 | 11546 |
| RQ020G | costofgoods | RQ020Gcostofgoods | 2017 | 5086 | 13891 |
| RQ020G | costofgoods | RQ020Gcostofgoods | 2016 | 0 | 0 |
Solved! Go to Solution.
Hey @anna-lee ,
You can use the code below:
SumValue =
CALCULATE (
SUM ( Table[Value] ),
ALLEXCEPT ( Table, Table[Vendor Code], Table[Year] )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Stand with Ukraine!
Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/
Thank you!
Hi @anna-lee
Please try
Result =
CALCULATE (
SUM ( 'Table'[Value] ),
ALLEXCEPT ( 'Table', 'Table'[Vendor Code], 'Table'[Year] )
)
Hey @anna-lee ,
You can use the code below:
SumValue =
CALCULATE (
SUM ( Table[Value] ),
ALLEXCEPT ( Table, Table[Vendor Code], Table[Year] )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Stand with Ukraine!
Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/
Thank you!
thank you!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 22 | |
| 10 | |
| 10 | |
| 7 | |
| 5 |