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
AbdelrahmanAyad
Frequent Visitor

USE Value in SelectedValue() as column

Hey Guys,

 

I have a problem , I have a report filter for the date. So I want to use the value selected by the user as the value for a fact table for example if the user selected '1/1/2017' I want the new column that i will create in my fact table to all have this value. 

 

I created a measure as follows : 

 

Selected Date = SelectedValue ('Calendar'[Date]) 

 

However when i use it in the facttable it shows the value of the date of the fact table not the one selected by the user. 

 

 

1 ACCEPTED SOLUTION

Hi @AbdelrahmanAyad,

 

Please try:

Selected Date = MAX('Calendar'[Date]) 

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Calculated columns are calculated only ONCE, AT REFRESH.  They do not change in response to measures, or slicer selections.

I am also looking to generate temporary tables that allow me to generate charts that change about the date and number of periods selected.
This is something that I solved in Excel creating dynamic variables and ranges, but here in Power BI I still have not been able to find a way to do it.
If anyone has an idea of ​​how it could be done, I would appreciate your help.

Thank you for your great response, but do you know if there is a possible way to capture the selected value and keep using it in multiple statements. For example, Lets assume i selected 1/1/2017 i want capture this value and use it in other tables neglecting the other relations for instance if used it in fact table to filter the rows to perform on lookup helps , as if i tried to create a measure = selectedvalue(calendar) date and i use in my expression : FactTAble[date] = measure the measure automically takes the value of the date field of the table column

Hi @AbdelrahmanAyad,

 

Please try:

Selected Date = MAX('Calendar'[Date]) 

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AbdelrahmanAyad
Frequent Visitor

Hey Guys, 

 

I have a problem and I think you guys will hopefully help me with it. 

 

I have a report filter which is date.

 

So i want to capture this date for e.g "2017/01/01" and in one of my tables i want to create a new calculated column that will hold for all of the rows the value selected which is "2017/01/01" 

 

I tried to create a measure like this : 
Selected Date = SELECTEDVALUE('Calendar'[Date]) but when i add it to the column , it shows the value of the date that is in the fact table.

 

Any help will be appreciated

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.