2016-02-05 42 views

回答

1

電源查詢

// Add new custom field 
Max8 = 
if [FieldName] > 8 
then 8 
else [FieldName] 

DAX

// Calculated column 
Max8 = 
IF(
    'TableName'[FieldName] > 8 
    ,8 
    ,'TableName'[FieldName] 
) 

// As a measure to test another measure's return value 
Max8:= 
IF(
    [MeasureName] > 8 
    ,8 
    ,[MeasureName] 
) 
+0

我不知道您的評論的手段。無論如何,我會盡力迴應。 'then'只是Power Query的M語言中的一個關鍵字。 DAX沒有「then」關鍵字或功能。 IF()是DAX中的一個函數,當第一個參數的計算結果爲true時,第二個參數的計算結果爲第二個參數,如果第一個參數的計算結果爲false,則計算其第三個參數。 – greggyb