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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
farhadidrees
Frequent Visitor

How to get current filter selected date in calculated column

Hi All,

 

I have two tables,

1-DimDate

2-Services

 

There is no relationship between them because for DimDate i am using date in Slicer to return only rows of Services which exist from and To dates, and it is working fine.

 

The issue is in Services table i want to create one calculate column in which i want to return current selected date of slicer so that i can use it for further calculation.

I am using below Dax but it is returning Blank.

 

var selectedperiod = MONTH(SELECTEDVALUE(DimDate[Date]))
return selectedperiod
 
any clue for this?
1 ACCEPTED SOLUTION
Barthel
Solution Sage
Solution Sage

Hey @farhadidrees,

A slicer selection does not affect calculated columns. A slicer selection only affects the visuals on your pages. If you want to write a certain calculation based on a slicer selection, you will have to process this in a measure, which you can then place in a visual. 

View solution in original post

1 REPLY 1
Barthel
Solution Sage
Solution Sage

Hey @farhadidrees,

A slicer selection does not affect calculated columns. A slicer selection only affects the visuals on your pages. If you want to write a certain calculation based on a slicer selection, you will have to process this in a measure, which you can then place in a visual. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors