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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nabullock
Frequent Visitor

Issue using SELECTEDVALUE for selecting a specific date.

This code returns the correct value in a table "visual" 

nabullock_0-1681143472821.png

But this to a column in table

nabullock_1-1681143572340.png

sDate =
VAR selectedDate =SELECTEDVALUE(SelDates[ListedDate]) -30
Return selectedDate
 

 

1 ACCEPTED SOLUTION
MohammadLoran25
Solution Sage
Solution Sage

Hi @nabullock ,

You just need a CALCULATE:

sDate =
VAR selectedDate =
    CALCULATE ( SELECTEDVALUE ( SelDates[ListedDate] ) ) - 30
RETURN
    selectedDate

 

If this solves your question, Please give it a thumbs up and accept it as a solution to make it easier for the others to find what they are looking for.

Regards,
Loran

 

 

 

View solution in original post

2 REPLIES 2
nabullock
Frequent Visitor

Thanks!

MohammadLoran25
Solution Sage
Solution Sage

Hi @nabullock ,

You just need a CALCULATE:

sDate =
VAR selectedDate =
    CALCULATE ( SELECTEDVALUE ( SelDates[ListedDate] ) ) - 30
RETURN
    selectedDate

 

If this solves your question, Please give it a thumbs up and accept it as a solution to make it easier for the others to find what they are looking for.

Regards,
Loran

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.