Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
fabiopaturzo
Helper I
Helper I

New table aggregate Items sales per last 12 Month

Hi I have following table with Items sale per month e year per row.

Each items has more record

 

Item_NoSomma di Sales_Entry_NoSales_Post_DateSomma di Sold_QuantityMonthYear
T- Shirt 32814910/06/2021 00:000Giugno2021
T- Shirt 32823716/06/2021 00:0025Giugno2021
T- Shirt 323087528/06/2022 00:000Giugno2022
T- Shirt 323097030/06/2022 00:0025Giugno2022
Jacket 211652704/05/2021 00:000Maggio2021
Jacket 211652805/05/2021 00:00400Maggio2021
Jacket 2113423913/12/2021 00:00200Dicembre2021
Jacket 2115168815/12/2021 00:000Dicembre2021
Jacket 2113893905/01/2022 00:00600Gennaio2022
Jacket 2114976117/02/2022 00:00400Febbraio2022
Jacket 2118300920/04/2022 00:00500Aprile2022
Jacket 2117166505/12/2022 00:00500Dicembre2022
Jacket 21114466415/12/2022 00:001200Dicembre2022
Jacket 2117540406/02/2023 00:00800Febbraio2023
Socket1473405/03/2021 00:00200Marzo2021
Socket3783016/07/2021 00:0050Luglio2021
Socket1932719/07/2021 00:000Luglio2021
Socket1941520/07/2021 00:00200Luglio2021
Socket6056225/10/2021 00:00200Ottobre2021
Socket11633411/05/2022 00:00250Maggio2022
Socket7209912/12/2022 00:00200Dicembre2022

I would like to create a new table with aggred Item per sale last 12 month 

for instance

Item_NoSold_Quantity 12 month
T- Shirt 3235456
Jacket 211232456
Socket12345
2 REPLIES 2
amitchandak
Super User
Super User

@fabiopaturzo , better to create a measure with help from date table

 

example

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-12,MONTH))

 

window function you can also use

Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I would like to have the total sales per Item

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.