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
r4sh1d
Regular Visitor

Targets set at different grouping levels

In an example, there is a detailed level table where sales are recorded at transaction level with a column for month, quarter and year.

 

In terms of aggregating the results for visualisation, I am able to easily sum the sales at various levels e.g. annual, quarterly, monthly etc.

 

The targets are set at annual and quarterly level. I am not sure how to bring these into visualisations.

 

I have crated grouped tables in the Query Editor, aggregating the sales at the same level at the targets and then loaded the targets in a seperate table with a relationship between the appropriate level of aggregation e.g. annual summary table related to annual target table.

 

This means the reports I create for performance to target serve their purpose but do not offer flexibility in terms of being able to drill down. Ideally, I would be able to use a single data set, with aggregation done within the creation of visualisations - but how can I bring the targets into it then?

1 ACCEPTED SOLUTION

If I'm understanding the problem, you have a sales table that has sales at the date level. You have a targets table that doesn't have targets at the date level - targets are associated to a quarter/year only. Right now, to create a visualization with both sales & targets together you're creating a separate table that aggregates both numbers to the same levels (i.e. you're creating a separate table for quarterly numbers and a separate table again for annual numbers). This is working for a fixed visualization, but doesn't allow any drill down from annual to quarterly.

 

What you really want to do is join both sales & targets to a single date lookup table (with the join at the appropriate level: date for sales and quarter/year for targets) so that you can aggregate both sales & targets by the same year attribute and drill down from annual to quarterly smoothly. (Are you familiar with lookup tables and why they're useful when you want to slice two measures by the same thing?)

 

If you have a date lookup table, then joining sales to that lookup table is a straightforward relationship. Joining targets isn't as straightforward though. This article, similar to the ones @itchyeyeballs shared, describes how to create a measure (BudgetCalc) that connects to a date lookup table on month/year (and goes on to gracefully handle situations when someone drills down too far). You should be able to adapt the principals to your situation (quarter/year).

 

http://www.sqlbi.com/articles/budget-and-other-data-at-different-granularities-in-powerpivot/

 

---
In Wisconsin? Join the Madison Power BI User Group.

View solution in original post

4 REPLIES 4

Thanks. While that is helpful to some extend, I am unable to apply a model which uses date as a primary key to link tables.

 

If Targets are set at global, continent, country and city level - for example - you would be unable to work off a date reference. The problem is as you slice, the target sits in a different level of hierachy.

 

If the report starts on global performance summary against target, if a filter/slicer is applied for a particiular continent, the model needs to know to then look for a continent level target rather than global or country.

 

 

Did you find a solution to your problem that addressed the need to link data of different granularities beyond just date? I have the same problem before me and am stumped.

If I'm understanding the problem, you have a sales table that has sales at the date level. You have a targets table that doesn't have targets at the date level - targets are associated to a quarter/year only. Right now, to create a visualization with both sales & targets together you're creating a separate table that aggregates both numbers to the same levels (i.e. you're creating a separate table for quarterly numbers and a separate table again for annual numbers). This is working for a fixed visualization, but doesn't allow any drill down from annual to quarterly.

 

What you really want to do is join both sales & targets to a single date lookup table (with the join at the appropriate level: date for sales and quarter/year for targets) so that you can aggregate both sales & targets by the same year attribute and drill down from annual to quarterly smoothly. (Are you familiar with lookup tables and why they're useful when you want to slice two measures by the same thing?)

 

If you have a date lookup table, then joining sales to that lookup table is a straightforward relationship. Joining targets isn't as straightforward though. This article, similar to the ones @itchyeyeballs shared, describes how to create a measure (BudgetCalc) that connects to a date lookup table on month/year (and goes on to gracefully handle situations when someone drills down too far). You should be able to adapt the principals to your situation (quarter/year).

 

http://www.sqlbi.com/articles/budget-and-other-data-at-different-granularities-in-powerpivot/

 

---
In Wisconsin? Join the Madison Power BI User Group.

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.