Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
My code below return the change(current result-last result) for most case. However, if there is no last result data, then it will return the current result instead of the change. How could i just return "-" if this case?
Q Change(vs Last Survey) = var _date= maxx(filter('Survey Data Score', 'Survey Data Scores(%)'[Facility Name + ID] = earlier('Survey Data Score'[Facility Name + ID]) && 'Survey Data Scores(%)'[Survey Close Date] < earlier('Survey Data Score'[Survey Close Date]) ), 'Survey Data Score'[Survey Close Date])
var _score='Survey Data Score'[question]- maxx(filter('Survey Data Score', 'Survey Data Score'[Facility Name + ID] = earlier('Survey Data Score'[Facility Name + ID]) && 'Survey Data Score'[Survey Close Date] =_date ), 'Survey Data Score'[question])
return
IF('Survey Data Score'[Current/Last]="Current Survey", IF(_score='Survey Data Scores(%)'[question],0,ROUND(_score,1) ))
Hi, @Hayoung
Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures. I look forward to your response.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
89 | |
82 | |
71 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |