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.
I need to get the selected date from a drop down slicer from a date table that does not have relationships to any tables. The selected date is then put to a new column. I tried using selectedvalue and it only returns blanks.
Solved! Go to Solution.
Let us assume you want to show the date on cart
Measure =
Var _max =Maxx(Date,allselected(Date[Date]))
Return
_max
You want sales from the sales table
Measure =
Var _max =Maxx(Date,allselected(Date[Date]))
Return
calculate(sum(sales[value]),sale[date]=_max)
Please put up an example of what you need.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin
Thank you for the quick response.
You are correct Mr. Felix, i did not tried that procedure which is returning blanks on the custom column.
Measure =
Var _max =Maxx(Date,allselected(Date[Date]))
Return
_max
@amitchandak solution solved my problem.
Let us assume you want to show the date on cart
Measure =
Var _max =Maxx(Date,allselected(Date[Date]))
Return
_max
You want sales from the sales table
Measure =
Var _max =Maxx(Date,allselected(Date[Date]))
Return
calculate(sum(sales[value]),sale[date]=_max)
Please put up an example of what you need.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin
Hi @ggzmorsh ,
You cannot get data from a slicer into a calculated column you need to use a measure in order to get the calculations you need.
So the selectedvalue is the correct formula however that needs to be used in a measure. What is the calculation you are trying to achieve in the calculated column?
Can you share a mockup data so I can assist you better.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |