Forum Discussion
derekma19
3 years agoFrequent Visitor
Line Chart with two lines with different values and dates using a unique X axis
Hi, I'm trying to display 2 lines of values based on different dates. The data is as shown as below. StartDate EndDate StartValue EndValue 01 Jan 2021 15 Jan 2021 5 6 01 May 2021 ...
- 3 years ago
Hi, derekma19
If you have a calendar table, you can try add another inactive relationship between ‘Table’[EndDate] and 'Calendar'[Date].
Then put 'Calendar'[Date] to the x-axis of line chart , and put the following two measure to the y-axis of line chart.
M_startvalue = SUM('Table'[StartValue])M_EndValue = CALCULATE(SUM('Table'[EndValue]),USERELATIONSHIP('Table'[EndDate],'Calendar'[Date]))Please check attached pbix for more details.
Best Regards,
Community Support Team _ Eason
v-easonf-msft
3 years agoCommunity Support
Hi, derekma19
If you have a calendar table, you can try add another inactive relationship between ‘Table’[EndDate] and 'Calendar'[Date].
Then put 'Calendar'[Date] to the x-axis of line chart , and put the following two measure to the y-axis of line chart.
M_startvalue = SUM('Table'[StartValue])M_EndValue = CALCULATE(SUM('Table'[EndValue]),USERELATIONSHIP('Table'[EndDate],'Calendar'[Date]))
Please check attached pbix for more details.
Best Regards,
Community Support Team _ Eason