Forum Discussion
ROG
Responsive Resident
4 years agoDax measures help need
Hi all, I posted a question here this morning but I didn't get the full solution, so I thought I would post here where I got stuck at. I want to add a new column saying 'Customer type change?...
- Anonymous4 years ago
Hi ROG ,
Please try below options:
My test table:
ProductAcquisition:
CustomerType:
Model:
Try below DAX to add new column in table ProductAcquisition:
CurrentCustType_FromCT = RELATED(CustomerType[CurrentCustType])Column = if([First_CustType]= [CurrentCustType_FromCT],1,0)Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Barthel
Solution Sage
4 years agoHey,
In measures you cannot directly refer to columns, because there is no row context. Your matrix contains the columns, so based on the filter context per row there is only one value for the columns. We can retrieve this single value using the SELECTEDVALUE function. Use this code for your measure:
Measure =
INT (
SELECTEDVALUE ( ProductAcquisition[First_Product] )
= SELECTEDVALUE ( ProductAcquisition[Current_Product] )
)