Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

Hi @Anonymous ,

 

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
Pragati11
Super User
Super User

Hi @Anonymous ,

 

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/770272

 

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

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

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.

Hi @Anonymous ,

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.