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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
olives
Helper I
Helper I

Calculate cycle of order from the last 12 months from the last sales

Hi,

I am trying to create a calculated column to show the cycle of order (number of months) that two products (A and B) are ordered in each store.

I have a "Store" table, "Sales" table and "Calender" table.

I would like to start calculating from the last 12 months from the last sale.

 

sales

store_cdQTYdateitem
20012021/10/1C
20052021/11/1A
20032021/12/1A
20052022/2/1C
200112022/5/1A
20022022/7/1B
20022022/10/1A
20022022/10/1C
20032022/11/1A
20062022/12/1A
200-62022/12/1A

 

stores

store_cdstore_name
200StoreA
201StoreB
202StoreC
203

StoreD



For the result, I would like to get 2.4 (12month /5 times) for store 200.

olives_1-1677751989286.png

 

Please help!

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

2 REPLIES 2
lbendlin
Super User
Super User

lbendlin_0-1677895892344.png

 

@lbendlin 
Thank you so much for your help!
It worked😊

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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