cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Dynamically chnage the Value of a column value based on filter selection

Hi!

I have a report where I have created a column called Reporting Week date and currently hard coded to whatever week we are reporting for. I have a STart of week date column in the table as well. What I want to be able yo do is instead of chnaging the Reporting week hard coded value every week    (This reporting week field  has been used in calculations in many other column values as well)    I want to have a slicer or a drop down list on the report, as soon as I select "for example the Start of week as April 12 2020", the reporting week date should automatically take that vale and all the calculations using Reporting week date also uses the selected date. Currently I have it hard coded and I have to chnage it every week and there are chnaces we may forget chnaging it sometime and the report values is not correct.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Dynamically chnage the Value of a column value based on filter selection

Hi @aagni2000 ,

 

Would you please try to create a new table that only contains Reporting Week date column for slicer (Don't create any relationship for it):

 

Slicer = Values('table'[Reporting Week date])

 

Then use something like:

 

ReportingWeekCalc = SELECTEDVALUE(Slicer[Reporting Week date])

 

In the column filed that you created by hardcoding. It will not affect all the visuals.

 

Best Regards,

Dedmon Dai

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Dynamically chnage the Value of a column value based on filter selection

Hi @aagni2000 ,

 

You can try using SELECTEDVALUE function to achieve this. There are few existing threads with solutions on this:

https://community.powerbi.com/t5/Desktop/Dynamic-Column-Name-change-Based-on-Slicer-Selection/m-p/77...

 

Somehting like this:

ReportingWeekCalc = SELECTEDVALUE(Tabl1[Reporting Week])

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati



Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Highlighted
Helper V
Helper V

Re: Dynamically chnage the Value of a column value based on filter selection

Thanks for your reply, but this will reflect the chnage on the entire report visuals, I just want to chnage the value of the column field that I created bu hardcoding  called " Reporting week date = "DATE(2020,4,12)" for example , to chnage to whatever selection I made based on the slicer on the report. As this Reporting week is being used to calculate few other fields , I want only chnages happening to this Reporting week date column , when this is dynamically changed the visual will only reflect the chnage in numbers. If I do it bu SELECTEDVALUE and use the Main Date from the table as the slicer, it is restricting all the visuals to just one date.

Highlighted
Microsoft
Microsoft

Re: Dynamically chnage the Value of a column value based on filter selection

Hi @aagni2000 ,

 

Would you please try to create a new table that only contains Reporting Week date column for slicer (Don't create any relationship for it):

 

Slicer = Values('table'[Reporting Week date])

 

Then use something like:

 

ReportingWeekCalc = SELECTEDVALUE(Slicer[Reporting Week date])

 

In the column filed that you created by hardcoding. It will not affect all the visuals.

 

Best Regards,

Dedmon Dai

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors