Forum Discussion
Create a Measure/Solution aggreagteing Data and comparing 2 columns
- 1 year ago
Hi AC123 -you don’t need to create a new table or model relationship if you just want to align Customer_1 with aggregated values from Customer_2.
create a measure with below filter condition as follow:
Total Transactions_MatchedToCustomer1 =
CALCULATE(
SUM(Data[Transactions_Customer_2]),
FILTER(
ALL(Data),
Data[Customer_2] = MAX(Data[Customer_1])
)
)This works please check.
Hi AC123 -you don’t need to create a new table or model relationship if you just want to align Customer_1 with aggregated values from Customer_2.
create a measure with below filter condition as follow:
Total Transactions_MatchedToCustomer1 =
CALCULATE(
SUM(Data[Transactions_Customer_2]),
FILTER(
ALL(Data),
Data[Customer_2] = MAX(Data[Customer_1])
)
)
This works please check.
- v-aatheeque1 year ago
Community Support
Hi AC123
Just checking back on your question about combining Customer_1 and Customer_2 metrics into a single matrix line using DAX.
As shared earlier by danextian rajendraongole1 the recommended approach involves creating an aggregated DAX table (e.g., using GROUPBY or SUMMARIZE) for Customer_2 and establishing a 1:n relationship since both columns refer to the same logical entity but reside separately in the model.Were you able to try out that method or explore.
Let us know if you need any help happy to clarify things further!
Looking forward to your update!
- v-aatheeque1 year ago
Community Support
Hi AC123
Following up on your query about merging Customer_1 and Customer_2 metrics into a single matrix line via DAX.
As mentioned earlier by rajendraongole1 danextian the suggested solution is to create an aggregated DAX table for Customer_2 and set up a 1:n relationship, since both fields represent the same entity but are stored separately in the model.Have you had a chance to try this approach yet? Let us know if you’d like any further clarification.
- v-aatheeque1 year ago
Community Support
Hi AC123
Just following up on your question about combining Customer_1 and Customer_2 metrics in a single matrix row.As shared earlier, the recommended solution is to create an aggregated DAX table for Customer_2 and then establish a 1:n relationship to combine results, as shown in the sample data provided.
Were you able to try that method?
Let us know if you’d like any further clarification.?
Looking forward to your update!