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
mariuschrc
Frequent Visitor

SWITCH and DATEDIFF not working anymore

Months ago I used SWITCH this way, and it worked, no errors, all perfect.

mariuschrc_0-1705609051644.png

 

Today, even if I am using the same table/data I previously used, I cannot recreate this measure. What happened in the meantime?

mariuschrc_1-1705609386073.png

 

The same happens with DATEDIFF function. Intellisense not showing anymore and columns from the table are not considered by these functions in the new PowerBi format.

 

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

this will work if you are creating a column, but if you are creating a measure it will not work.
To make it work, wrap all the specified columns in your MAX function measure like so

MAX('VulnerabilityMgmt'[Today])- ,,,,,

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

this will work if you are creating a column, but if you are creating a measure it will not work.
To make it work, wrap all the specified columns in your MAX function measure like so

MAX('VulnerabilityMgmt'[Today])- ,,,,,

Daniel29195
Super User
Super User

hello  @mariuschrc 

it is weird that it was working, 

cause as far as i know you cant point to  a column like this unless you are using an iterator . 

 

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.