cancel
Showing results for 
Search instead for 
Did you mean: 
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.

View solution in original post

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.