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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Line chart troubleshooting when using multipile tables with dates.

I have a line chart that is combining two tables. One table is a list of units to be shipped by day (but not every day is a day that ships) and days have multiple shipments (or rows). The other line chart is a daily goal which is a total by day. I want to display both of these lines on one chart. I can get the units shipped by day to display when I set the line chart to count or sum. But when I add the goal line (which comes from another table) the chart sums all the days together.

 

I think my issue is that my shipment table has multiple rows per day (one row for each shipment) vs. my goal table has only one row for each day so for the join it duplicates the goal for every day that has multiple shipments (or rows)

 

Below is how the chart looks currently, the red line is what I'm trying to add (I drew it by hand)

 

chart 2.png

 

 

 

 

 

 

 

 

 

 

 

 

Below is what the chart looks like when I set it to average...but this is the average across all days...I want an amount that varies each

day

 

goal line3.png

If I change the goal line to be a sum it seems to sum all the days that have a goal

goal line4.png

Here is the issue I think my shipment table has multipile rows so days are repeated.

ZLIP table.png

 

 

 

 

 

 

 

 

 

My goal table (which is joined to above table by date only has one goal for each day.

goal table.png

 

 

 

 

 

 

 

 

Here is how the tables are joined which is thru a Date table

link table.png

 

 

 

 

 

 

 

 

6 REPLIES 6
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try the following measure:

Measure = 
CALCULATE(SUM('Table'[Capacity]),ALLEXCEPT('Date','Date'[Date]))

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

Thanks I tried that and it appears to still be summing all of the days. See below for screen shot

 

measure3.png

Hi @Anonymous ,

 

Is the date on your x-axis the same as the date you used in the measure?

If not, you could try the same date ( from the same table ).

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

Thanks for the idea.  When I type the formula in PowerBI preopopulates with a number of date choices (but none of the choices are the same date that I'm currently using on the X axis). Maybe this is the issue? I tried a number of the default choices but none of them work

 

asdfasdf.png

 

 

Greg_Deckler
Super User
Super User

Perhaps MAX? If the goal is repeated every day, just take the MAX of it, or the MIN.

 


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

Yes, I tried both Max and Min and I get the same result as if I take the average (right now the goal is the same for every day...but it will change once I figure out how to get this chart to work)

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.