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

Add Goal line to line chart with other data

Hello,

 

My company has an internal goal they have set. I created a measure for this goal and wanted to add it to the monthly performance I have put together in a line chart. The goal consisits of the same percentages that start over every month. I wanted this goal line added to the other data points in the line chart. Is there a line chart that does not only use 1 value and can use 2? Or one and a measure? The original chart was created in excel and I am trying to create the equivalent.

 

Jporter_0-1606175264261.png

 

Thank you for your help!

1 ACCEPTED SOLUTION

@Jporter

The regular line graph in the Power BI should solve the purpose. My advise would be to create separate measures for all the lines.

Line Graph.gif

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

View solution in original post

12 REPLIES 12
Ephack
Frequent Visitor

Puting "Goal" below "Running %" is not working?

Anonymous
Not applicable

It was not! I tried! Maybe because I have the filter for month_year I am assuming.

vivran22
Community Champion
Community Champion

Hey @Anonymous,

 

Can you share the Excel graph to see what you are looking for as an output?

 

Cheers!
Vivek

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Anonymous
Not applicable

Hi Yes. Please take a look. I have the other lines but want to add the grey goal line and some how the powerBI line chart will not let me. 

 

Jporter_0-1606177318343.png

 

@Jporter

The regular line graph in the Power BI should solve the purpose. My advise would be to create separate measures for all the lines.

Line Graph.gif

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Anonymous
Not applicable

Okay that makes sense. How do I create a measure for same time last year that can automatically update? The other months I can do.

@Anonymous 

 

You may use SAMEPERIODLASTYEAR.

 

CALCULATE([Measure Name], SAMEPERIODLASTYEAR(Calendar[Date]))

 

For more details, you may refer to the following article:

DAX Time Intelligence Part 1: Introduction (vivran.in)

 

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Anonymous
Not applicable

Hi Vivran,

 

Thank you so much for your help. However, it seems to not be working compared to what I had before.

 

Jporter_0-1606180538615.png

 

Jporter_2-1606180878835.png

 

 

They all have to start over at 0. I created a column for Day of Month and that let it start over at 0 like the chart above.

@Anonymous 

 

Can you share the sample data/pbix file?

 

Cheers!
Vivek

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Anonymous
Not applicable

I got the current month to work using this:

 

urrent_month = CALCULATE(
[Running %],
FILTER(
ALLSELECTED('Total Collected'[Day of Month]),
'Total Collected'[Day of Month]<= MAX('Total Collected'[Day of Month])
)
)
 
I cannot get it to work for last month or last year. I wonder if it is also because I added a date filter to the graph.

@Anonymous 

 

Providing support without any detail of the data model is very difficult. Are you using a calendar/date table in your model? Time Intelligence functions works best on the date columns and I think that [Day of the Month] is not a date column.

 

 

Anonymous
Not applicable

Unfortunatly, I cannot share the file. I don't have any sample data. 

 

What I can share is this is how the Running % is calculated.

 

Running DQ Total =
CALCULATE (
SUM ( 'Total Collected'[total_collected] ),
FILTER(
ALLSELECTED('Total Collected'[Day of Month]),
'Total Collected'[Day of Month]<= MAX('Total Collected'[Day of Month])
)
)
 
Running % = DIVIDE('Total Collected'[Running DQ Total], Collections[Overall DQ $ StartOfMonth])
 
I am thinking I may have to do something similar for current month, last month and last year same as current month.

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.