Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I'd like to create a new table which contains data from another table.
Here is what my original table looks like:
Date | Category | Sub-category | Amount |
July 2019 | A | 1 | 10 |
July 2019 | A | 2 | 15 |
July 2019 | B | 1 | 10 |
July 2019 | B | 2 | 20 |
August 2019 | A | 1 | 10 |
August 2019 | A | 2 | 20 |
August 2019 | A | 3 | 30 |
August 2019 | B | 1 | 15 |
August 2019 | B | 2 | 10 |
What I'm looking to get in a new table is this:
Category | Date | Amount |
A | July 2019 | 25 |
B | July 2019 | 30 |
A | August 2019 | 60 |
B | August 2019 | 25 |
So basically it is a sum of the amount per category and per month.
How can I achieve this ?
Thanks
Solved! Go to Solution.
Hi,
You could try creating a new table under the modeling tab and use something like the code below:
Hi,
You could try creating a new table under the modeling tab and use something like the code below:
Beautiful, it worked. Thanks !