Forum Discussion
dynamic column according to the filter
Hello,
I need to create a column to rename the field "Year" according to the filter dynamically.
let's imagine that I have 3 years : 2021, 2020, 2019
and I filter on the year 2020.
I want to have :
2020 : N
2019 : N-1
If I filter on the year 2021, I wish to obtain :
2021 :N
2020 : N-1
2019 : N-2
Can anyone help me?
Thanks
Hi, KLAH96
Please check the below picture and the sample pbix file's link down below whether it is what you are looking for.
I tried to create a sample pbix file based on the explanation.
https://www.dropbox.com/s/x2nnng7yhxfsmt0/klah.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
3 Replies
- Jihwan_Kim
Super User
Hi, KLAH96
Please check the below picture and the sample pbix file's link down below whether it is what you are looking for.
I tried to create a sample pbix file based on the explanation.
https://www.dropbox.com/s/x2nnng7yhxfsmt0/klah.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
- amitchandak
Super User
KLAH96 , Create a column in power query
Date.Year([Date])
and pivot this column not with value columns