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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic date comparison issue

Hello Experts,

 

We have a strange issue where dynamic date selection is not able to compare and it gives wrong results. 

 

We have two tables one for dynamic date and other with transaction Data.

 

Dynamic Date formula:

Table_Date = CALENDAR(DATE(2020,01,01),DATE(2021,12,31))

 

If Condition to compare dates and get the result:

Condition = IF([Selected date]>='Release KPI''s History'[History Date Converted],1,2)

 

PBI-dynamic date selection.JPG

 

Based on the above logic the result should be 2 but it always returns 1.

 

Please find the PBIX attached in the link below, please help us to resolve the issue.

 

https://drive.google.com/drive/folders/19pq6tNxGMauFjUOMzyjiPD1kQP-0H8We?usp=sharing

 

Thanks..

3 ACCEPTED SOLUTIONS
Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

You are trying to pass dynamic value of date in calculated column and hence its giving wrong result.

 

Please create measure as below and check if it works:

ConditionMeasure = IF([Selected date]>=FIRSTNONBLANK('Release KPI''s History'[History Date Converted],0),1,2)

 

Please mark it as solution if it solves your requirement.

 

Thanks!

Cheers,
Shishir

View solution in original post

nandic
Super User
Super User

Hi @Anonymous ,
@Shishir22  is correct.
Calculated columns are calculated on refresh of the file. But it means refresh icon in toolbar, but not slicers.
When changing slicers, it doesn't influence on calculated columns.
On the other hand, measures are created on-fly, so when you change slicers, measures are automatically recalculated.
So measures are dynamic based on slicer change, calculated columns are static.

Example of calculation:

selected date.PNG

 

Regards,
Nemanja Andic

View solution in original post

Anonymous
Not applicable

Hi @nandic,

Thanks!
Appreciate your valuable inputs.

View solution in original post

4 REPLIES 4
nandic
Super User
Super User

Hi @Anonymous ,
@Shishir22  is correct.
Calculated columns are calculated on refresh of the file. But it means refresh icon in toolbar, but not slicers.
When changing slicers, it doesn't influence on calculated columns.
On the other hand, measures are created on-fly, so when you change slicers, measures are automatically recalculated.
So measures are dynamic based on slicer change, calculated columns are static.

Example of calculation:

selected date.PNG

 

Regards,
Nemanja Andic

Anonymous
Not applicable

Hi @nandic,

Thanks!
Appreciate your valuable inputs.

Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

You are trying to pass dynamic value of date in calculated column and hence its giving wrong result.

 

Please create measure as below and check if it works:

ConditionMeasure = IF([Selected date]>=FIRSTNONBLANK('Release KPI''s History'[History Date Converted],0),1,2)

 

Please mark it as solution if it solves your requirement.

 

Thanks!

Cheers,
Shishir
Anonymous
Not applicable

Hi @Shishir22,

Thanks!
Its working fine now.

Appreciate your valuable input.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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