Forum Discussion
IF in DAX Studio
Hi,
I am not sure if I understood your question correctly, but please try something like below.
EVALUATE
ADDCOLUMNS (
SUMMARIZE (
VALIDATED_PD,
VALIDATED_PD[m_Group_Currency_Amount],
VALIDATED_PD[d_Customer_Name]
),
"Total Overdue", [a_TotalOverdue],
"Customer Name",
VAR f_GM_CustomerPD = VALIDATED_PD[d_Customer_Name]
RETURN
IF ( f_GM_CustomerPD = "GM", "GM", VALIDATED_PD[d_Customer_Name] )
)
I have this but the bold part doesn't work the "Customer Number" column, the rest does
EVALUATE
ADDCOLUMNS (
SUMMARIZE (
VALIDATED_PD,
VALIDATED_PD[m_Group_Currency_Amount],
VALIDATED_PD[d_Customer_Name]
),
"Total Overdue", [a_TotalOverdue],
"Customer Name",
VAR f_GM_CustomerPD = VALIDATED_PD[d_Customer_Name]
RETURN
IF ( f_GM_CustomerPD = "GM", "GM", VALIDATED_PD[d_Customer_Name] ),
"Customer Number",
VAR f_GM_CustomerPD = VALIDATED_PD[d_Customer_Name]
VAR f_GM_CustomerNumber = VALIDATED_PD[m_Customer_Number]
RETURN
IF ( f_GM_CustomerPD = "GM", BLANK(), f_GM_CustomerNumber )
)