Forum Discussion
Line chart between two dates
- 2 years ago
It is normal to have just some dots when you add the Description because the dataset is too small to draw lines (you just have singel values). I extrapolated some of your data in the dataset and made it Credit with 5 Installments each and I get the below:
I've put the PBIX file here: PBIX and the CSV here: CSV
As always, if it solved your problem then please mark it as the solution.
Hi,
I don't really understand what do you mean by
However, the start and end of the line should be based on the PurchaseDate and PaymentDate columns.
These are two independent events and I believe you do have different dates in your real data (as you have in the sample data)
05/02/2024;05/11/2024;Wireless Headphones;Credit;-450;15850;5If what I assume is correct then you might have two options:
1. Create two measures, one based on Purchase Date and the other on Payment Date and plot them in a line chart based on the dimDate[Date] date. You already have a relationship between [Date] and Purchase Date so you need to create the 2nd relationship. This relationship will be inactive but you can activate it when creating the measure for Payment Date by using USERELATIONSHIP at the end of your calculation.
2. Create an Outstanding Debts only if the Payment Date differs from Purchase Date (see below):
Outstanding Debt 2 = CALCULATE(
SUM(Installment_BankStatement[Amount]),
Installment_BankStatement[PaymentMethod] = "Credit",
Installment_BankStatement[PurchaseDate] >= MIN(dimCalendar[Date]),
Installment_BankStatement[PurchaseDate]<>Installment_BankStatement[PaymentDate])The do the Accounts Payable with the above measure, then plot it using the dimDate[Date].
If this answered your question please mark it as the solution.
Best,
"However, the start and end of the line should be based on the PurchaseDate and PaymentDate columns."
Sorry for not explaining clearly.
What I mean is that we need to base the line creation on this period to return its installments.
For example:
- Amount = 1000
- Installments = 5
- Installment amount = 1000 / 5 = 200
- Period = 06/20/2024 to 11/20/2024
So, we should create a line in a line chart that returns the installment values within the period from 06/20/2024 to 11/20/2024.