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

PowerBI Goals Dataset: Target only gets saved on single date.

Hi, I am using PowerBI Goals and connected to its dataset.

I need some help with the way the data is stored.

I am trying to create a linear graph with history of the values that were inserted. Next to that, I want a straight line as a target-line.

 

The table with data looks as follows:

OlavRab_0-1622558310355.png

If I create a line-chart from this table called 'values', I get the following.

OlavRab_1-1622558409453.png

This is because the 'target' field is filled on 27/5 and 28/5. But not on other dates.

Does anybody have a solution to take the latest filled value in the 'target' column for every name (as there are multiple names other than 'offshored hours' and insert it to all target fields. 

As I am using a direct-query connection, I cannot use the query editor.

 

Thanks already!

 

1 ACCEPTED SOLUTION

Hi, @Anonymous 

Thank you for your feedback.

please check the link down below.

 

https://www.dropbox.com/s/zdze7ukxnqrpjs6/all_targets.pbix?dl=0 

 

Picture1.png

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

I am not sure if I understood your question correctly but please check the below picture and the sample pbix file's link down below.

 

Target Latest value =
CALCULATE (
LASTNONBLANKVALUE ( 'Table'[Timestamp], SUM ( 'Table'[Target] ) ),
ALLEXCEPT ( 'Table', 'Table'[Name] )
)
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

Hello @Jihwan_Kim 

 

Thanks so much for sharing, I think your solution is really close.

Unfortunately I forgot to mention that the 'values' table has a relationship with another table 'goals'. Therefore, your current solution does not work yet.

I have my datamodel with the exact data in the following file:

 

https://1drv.ms/u/s!AsD4rpmHpwK5hJJHfJosIjOavRT57w?e=bCoNbV

 

Hope you can see what the datamodel is and find the right solution.

 

Thanks already!

 

Olav

 

Hi, @Anonymous 

Thank you for your feedback.

please check the link down below.

 

https://www.dropbox.com/s/zdze7ukxnqrpjs6/all_targets.pbix?dl=0 

 

Picture1.png

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.

Top Solution Authors