The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 !
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |