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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
GKJARC
Resolver I
Resolver I

Comparing values to target values

Hi everyone,

 

I'm trying to compare achieved lead times to target lead times. These target values come from a database and can differ per year.
My sample PBIX-file can be downloaded via the link at the bottom of this post.

DIM_Targets:

GKJARC_0-1697717653851.png

 

The idea is to visualize the data in the report as follows:

GKJARC_4-1697724474923.png

 

Blue are columns from DIM_Maintenance, 'Lead time' is a calculated column based on StartDate and EndDate.

Red are my two measures to fetch the target value from DIM_Targets, for the corresponding year of the StartDate. However, my measure picks the MAX target, so for the bottom 2 rows the targets now say 5 where they should say 4, as 4 is the target value for 2023.
'Achieved' is when Lead time <= Target value, else 'Not achieved'.

 

Model:

GKJARC_3-1697724043934.png

 

2 questions:

1) The targets could be used for DIM_Maintenance and DIM_Customer. Is this model a good setup for using targets?

2) How to show the right target value (Target ID = T1) in the 'Target (days)' column? In such a way that the calculated column or measure can also be used in a slicer, to filter e.g. only 'Achieved'.

Please find my sample PBIX-file here: 
https://we.tl/t-OpIWrDl1hS

Thanks!

4 REPLIES 4
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Thank you for your suggestion. I now added a link to the sample file at the bottom of my initial post.

Here is the measure used as a visual filter

 

lbendlin_0-1697990201351.png

I also modified the data model a bit.  Targets are not really a dimension table, at least how I understand your business premise.

lbendlin_1-1697990269459.png

 

 

Thanks @lbendlin for looking into it.  I understand that the measure Target achieved can be added in the side bar filters, but for users I'd prefer to add it in a slicer if possible. Although this is a nice-to-have.

 

The more important question is how to find the right target.
The target for %MaintenanceKey 840 is 4 instead of 5 (because start date year = 2023). What would be a measure to find the target where the target year equals the start date year?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.