I have below table in power BI and I want to perform below 2 things:
- I want to filter the table based on date. I.e, I want to filter only 01-Jan values.
- Once I get the 1st Jan values I want to calculate the difference between 2 dates.
Below is what I have:
| Date | Value|
| ——– | ——– |
| 1-Jan-2020 | 5.5 |
| 2-Jan-2020 | 6.2 |
| 1-Jan-2021 | 14.2 |
| 2-Jan-2021 | 3.4 |
.
.
I want to achieve below:
Date | Value | difference |
---|---|---|
1-Jan-2020 | 5.5 | Difference between value col [14.2-5.5] |
1-Jan-2021 | 14.2 |
NAV_Yearly_Diff =
var nav1
if (date = First_Of_Every_Year) return nav
New contributor
Swethaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.