Forum Discussion

KLAH96's avatar
KLAH96
Regular Visitor
5 years ago
Solved

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

  • 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

  • KLAH96 

    Values in columns cannot be filtered when you make your selection from a slicer. It is possible if you have the years on a visual and apply a measure.