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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors