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
Anonymous
Not applicable

Goals Table Best Practice

Hi All, I have monthly goals for companies and a table that contains actual sales.  What would be the easiest way to create a relationship between the 2? i initially tried to create a goals table, is this the best practice?  I'd like to have a graph of actual sales, goals, in year to date format.  I am having trouble building the relationship, is it because of my date?

 
 

2020-03-11_10-33-02.png

 

5 REPLIES 5
PaulDBrown
Community Champion
Community Champion

@Anonymous 

A key issue when setting up the model is to understand the level of granularity of your sales and goals data. Take your goals table for example. If your sales data's granularity is equivalent (date, company) you can merge the tables into a single table if you wish.

If however your sales table has more granularity (product for example), your goals table as is does not have a product breakdown. it's best to keep the sales and goals table separate and use lookup/dim tables with common fields (date table, company table...) to use in your DAX  statements, filters, slicers etc...(and/or calculate the goals down to product level by using a relevant parameter to do so - previous year's weight or whatever).

I actually prefer to keep the tables separate.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Thanks all for the feedback, spent some time to outline what im seeing, please let me know if i need to add more details.

 

I have 3 tables, actual data (All-Unfiltered Data), date table (Dates), and goals table (Goals).

 

2020-03-12_7-45-17.png

 

I only have goals defined for certain companies which is why you see there are more actual companies than goals.  

 

2020-03-12_7-38-09.png

 

I only want to track the YTD of the companies that have a defined goal, however the YTD is calculating companies that does not have a goal defined.

 

2020-03-12_7-40-44.png

 

My Relationship is as follows.

2020-03-12_7-41-51.png

 

Measures:

Goal Sum = SUM(Goals[Goal])
YTD Actual = TOTALYTD([Actual Sum],Dates[Date].[Date])
YTD Goal = TOTALYTD(Goals[Goal Sum],Dates[Date].[Date])
Actual Sum = SUM('All-Unfiltered Data'[Premium])
 

 

 

 

 

 

v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

About how to create and manage table relationships in power bi, I would suggest you refer to docs and blog below:

https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships

https://docs.microsoft.com/en-us/power-bi/desktop-relationships-understand

https://radacad.com/what-is-the-direction-of-relationship-in-power-bi

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,

 

If you have a Date table. Create a relationship between Date table to actual sales table and Create a relationship between Date table to goals table.

 

Use column from Date table on the x-axis.

 

 

Did I answer your question? If Yes, Give me a Kudo 

Greg_Deckler
Super User
Super User

Tough to say, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Is your goal data momthly, quarterly, yearly, ? Often I have seen the pattern of creating a column in your fact table based on date that specifies the month, quarter or year it is in based on what you are trying to match up with. For example, create a quarter column (or year/quarter column like 202001) if your goal data is quarterly. Do the same thing in your other table. Create a relationship.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.