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
VuongLM93
Helper III
Helper III

Apply same Month Target to calculate Actual daily achievement rate

Dear all,

 

I have researched on this forum but have not found an exactly similar answer,

What I have is a monhtly Target for each distributor, product and month,

POWER BI _ Data 1.JPG

 

On a weekly basis I want to cehck if the actual inventory is matching with the target of the month, by SKU and Distributor,

How do I match the month target to distributor / sku like the table below?

(example if a date falls within April -> then target of every day with be the April target)

Thanks so much for your time and support

A data set sample is inthe link below:

https://drive.google.com/open?id=1C1mFEY9woeijiYP-1l_AeoxpVQTror-1

POWER BI _ Data 2.JPG

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @VuongLM93 

Once you have your actuals and targets loaded into the model you can use some DAX to create bridge tables (SKU's, Distributors, and YearMonths).  I also added a YearMonthKey to the targets table so it can be joined to a date table.  You end up with something like this.  That YearMonths table in the middle is what joins the dates to the targets.

distributorsmodel.jpg

I have uploaded my sample .pbix file here: Distributors.pbix

This model and a couple measure let you get to the view in your file:

distributorstable.jpg

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hello @VuongLM93 

Once you have your actuals and targets loaded into the model you can use some DAX to create bridge tables (SKU's, Distributors, and YearMonths).  I also added a YearMonthKey to the targets table so it can be joined to a date table.  You end up with something like this.  That YearMonths table in the middle is what joins the dates to the targets.

distributorsmodel.jpg

I have uploaded my sample .pbix file here: Distributors.pbix

This model and a couple measure let you get to the view in your file:

distributorstable.jpg

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.