Forum Discussion
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.
5 Replies
- AnonymousNot applicable
Calculated columns are calculated only ONCE, AT REFRESH. They do not change in response to measures, or slicer selections.
- AbdelrahmanAyadFrequent VisitorThank 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
- v-yulgu-msftMicrosoft Employee
- AnonymousNot applicable
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.
- AbdelrahmanAyadFrequent 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