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
Anonymous
Not applicable

Changing calculated column to a measure

I have created below calculated column, and would like to make it as a calculated measure. How could i do it?
 
Change(vs Last Survey) = var _date= maxx(filter('Survey Data Scores(%)', 'Survey Data Scores(%)'[Facility Name + ID] = earlier('Survey Data Scores(%)'[Facility Name + ID]) && 'Survey Data Scores(%)'[Survey Close Date] < earlier('Survey Data Scores(%)'[Survey Close Date]) ), 'Survey Data Scores(%)'[Survey Close Date])

var _score='Survey Data Scores(%)'[Question]- maxx(filter('Survey Data Scores(%)', 'Survey Data Scores(%)'[Facility Name + ID] = earlier('Survey Data Scores(%)'[Facility Name + ID]) && 'Survey Data Scores(%)'[Survey Close Date] =_date ), 'Survey Data Scores(%)'[Question])
return

IF('Survey Data Scores(%)'[Current/Last]="Current Survey", IF(_score='Survey Data Scores(%)'[Question],0,ROUND(_score,1) ))
1 REPLY 1
amitchandak
Super User
Super User

@Anonymous, try like

 

Change(vs Last Survey) = var _date= maxx(filter(allselected('Survey Data Scores(%)'), 'Survey Data Scores(%)'[Facility Name + ID] = max('Survey Data Scores(%)'[Facility Name + ID]) && 'Survey Data Scores(%)'[Survey Close Date] < max('Survey Data Scores(%)'[Survey Close Date]) ), 'Survey Data Scores(%)'[Survey Close Date])

var _score=max('Survey Data Scores(%)'[Question])- maxx(filter(allselected('Survey Data Scores(%)'), 'Survey Data Scores(%)'[Facility Name + ID] = max('Survey Data Scores(%)'[Facility Name + ID]) && 'Survey Data Scores(%)'[Survey Close Date] =_date ), 'Survey Data Scores(%)'[Question])
return

IF(max('Survey Data Scores(%)'[Current/Last])="Current Survey", IF(_score=max('Survey Data Scores(%)'[Question]),0,ROUND(_score,1) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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