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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
I am trying to create a matrix that shows me the number of units purchased of a specific product per year by customer. Here is an example of the raw data I am working with
| Date | Name | Product 1 | Product 2 | Product 3 |
| 06/06/2024 | Julie | 1 | 5 | 0 |
| 06/16/2024 | Tom | 2 | 0 | 4 |
For my matrix, I have date and product as columns and the Name by rows. My matrix is outputted correctly. I would then like to add another column to my matrix that is a calculated field called "in last 12 months" and "sales in last 24 months". Can someone help me do that?
Thanks
Solved! Go to Solution.
Hi @Yelyak123 - you can try the below calculation , ceate two measure for 12 months and 24 hours as below add it to your matric visualization Values field.
Measure for 12 months:
Measure for 24 months:
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
HI @Yelyak123,
You can also take a look at the following blog about create matrix with custom fields if this suitable for your requirement:
Creating a “custom” or “hybrid” matrix in PowerBI
Regards,
Xiaoxin Sheng
Hi @Yelyak123 - you can try the below calculation , ceate two measure for 12 months and 24 hours as below add it to your matric visualization Values field.
Measure for 12 months:
Measure for 24 months:
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 18 | |
| 14 | |
| 14 |