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
Giswald
Frequent Visitor

Get latest Value until week

Hi I run into one problem at work here and through hours of googling and video-watching I could not find any answer that fit me.

 

I have a Customer-Article-Date-InStock Table:

CustomerIDArticleIDDateInStock
1127.07.20211
1128.07.20210
1113.07.20211

 

Giswald_0-1627381476746.png

 

From the Date I know the week numbere.

The "InStock" should be summarized per week. If no matching value is found for this week take the previous one (Could be any week before this).

So basically this is a change table and not a fact table.

 

I would expect:

Week 28: 1

Week 29: 1

Week 30: 0

 

How can I do this?

2 REPLIES 2
v-yetao1-msft
Community Support
Community Support

Hi @Giswald 

I don't quite understand the expected results you provided. What do you mean by no matching value ? How to judge ? Can you provide a more detailed data or pbix file to help us deal with problems better ?

 

Best Regards

Community Support Team _ Ailsa Tao

lbendlin
Super User
Super User

Have a separate (disconnected) dates table with the week ranges and then do a cross join between it and your not-a-facts table to drive the measures.  You may want to provide some more sample data and indicate the expected result so the premise is clearer.

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.