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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
ggzmorsh
Helper II
Helper II

Return value of selected date from a drop down slicer

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.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
ggzmorsh
Helper II
Helper II

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. 

amitchandak
Super User
Super User

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
MFelix
Super User
Super User

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


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors