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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Suhel_Ansari
Helper V
Helper V

Create a Column Based on the Selected Date Range

Hi All,

I want to create a New columns based on the selected Date range slicers from the based on teh date picker, I have creaetd "Selected Min Date" and "Selected Max Date" as seen in the screen print, so based on the date selected I want a New Columns for Min Date and Max Date, please assist.

Date Table:- Date = CALENDAR( DATE( 2015 , 1, 1) , DATE( YEAR( TODAY()) + 1 , 12 , 31))

Suhel_Ansari_0-1664461044630.png

Selected Max Date: - Selected Max Date = CALCULATE( Max('Date'[Date]) , ALLSELECTED('Date'[Date]))

Suhel_Ansari_1-1664461146179.png

Selected Min Date :- Selected Min Date = CALCULATE( MIN('Date'[Date]) , ALLSELECTED('Date'[Date]))

Suhel_Ansari_2-1664461186418.png

Now i want to create 2 New columns Min Date which should be the Selected Min Date & Max Date Columns which should be Selected Max Date, please assist I am facing the following error. Thanks

Suhel_Ansari_3-1664462142503.png

Regards

Suhel

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Suhel_Ansari Can't do that. Calculated columns are not dynamic. They are calculated at refresh time. You will need to create a measure.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  , I have cretaed the Measure All I need is the output of Selected Min date as input to new column, I need Year of seleced Min Date in new column .. 

@Suhel_Ansari You simply can't do that. A calculated column in DAX is only calculated at the time of refresh. It is not dynamic based upon selections by users. It doesn't matter what you try, that is never going to change.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Suhel_Ansari
Helper V
Helper V

@amitchandak  , @Greg_Deckler , @parry2k  , please asssit. Thanks

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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