cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Line chart

I have date slicer called ordered date. I need to show 2 lines in line chart x axis is ordered date and y axis is units. One line would be delivered units by delivered date and another shipped units by estimated date.

 

 I am creating measure :

CALCULATE('Table'[Delivered Units], FILTER('table' , 'Delivery Date'[Delivery Date]))
CALCULATE('Table'[shipped Units], FILTER('table' , 'Ship Date'[Ship Date]))
 
But I get delivered units and shipped units by order date.Please help.
 
1 ACCEPTED SOLUTION

Accepted Solutions
v-jiascu-msft Super Contributor
Super Contributor

Re: Line chart

Hi @Anonymous,

 

You need an independent Date table. If you have one, please try it with this formula. 

 

Calendar =
CALENDARAUTO ()

Then the two measures could be like below. There should be two relationships, which one is active and the other is inactive.

 

 

Measure 1 =
CALCULATE (
    SUM ( 'Table'[Delivered Units] ),
    USERELATIONSHIP ( 'table'[Delivery Date], 'calendar'[date] )
)
Measure 2 =
CALCULATE (
    SUM ( 'Table'[shipped Units] ),
    USERELATIONSHIP ( 'table'[Ship Date], 'calendar'[date] )
)

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Line chart with 2 dates and date slicer

I have date slicer called ordered date. I need to show 2 lines in line chart x axis is ordered date and y axis is units. One line would be delivered units by delivered date and another shipped units by estimated date.

 

 I am creating measure :

CALCULATE('Table'[Delivered Units], FILTER('table' , 'Delivery Date'[Delivery Date]))
CALCULATE('Table'[shipped Units], FILTER('table' , 'Ship Date'[Ship Date]))
 
But I get delivered units and shipped units by order date.Please help.
 
jthomson New Contributor
New Contributor

Re: Line chart

You don't want to filter the table like that, you need to create relationships between a date table and your delivery and shipping date, and then utilise userelationship to utilise the relevant relationship as appropriate

Anonymous
Not applicable

Re: Line chart

I have connection between the 2 tables. How to use userrealationship ?

v-jiascu-msft Super Contributor
Super Contributor

Re: Line chart

Hi @Anonymous,

 

You need an independent Date table. If you have one, please try it with this formula. 

 

Calendar =
CALENDARAUTO ()

Then the two measures could be like below. There should be two relationships, which one is active and the other is inactive.

 

 

Measure 1 =
CALCULATE (
    SUM ( 'Table'[Delivered Units] ),
    USERELATIONSHIP ( 'table'[Delivery Date], 'calendar'[date] )
)
Measure 2 =
CALCULATE (
    SUM ( 'Table'[shipped Units] ),
    USERELATIONSHIP ( 'table'[Ship Date], 'calendar'[date] )
)

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-jiascu-msft Super Contributor
Super Contributor

Re: Line chart

Hi @Anonymous,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 313 members 3,196 guests
Please welcome our newest community members: