Forum Discussion
Additional columns in DAX generated table
Hi,
I have two DAX generated tables with two columns (CustomerID, YearMonth).
Table A - generated using SUMMARIZECOLUMNS to get CustomerID and YearMonth to track active customers for each year and month combination.
CustomerID YearMonth
1001 201901
1002 201901
...
Table B - generated using EXCEPT(SUMMARIZECOLUMNS... where I subtract Table A from original customer table in order to get non-active customers.
CustomerID YearMonth
1011 201901
1012 201901
...
I have a request to add two additional columns to Table B for customer location Longitude and Latitude from the original customer database.
What is the best way to achieve this?
Thank you.
Why do you need calculated tables at all? Can't you just have Date, Customer, and Location tables in your model and get your result with measures alone? In any case, to answer the questions, more info needed on the table holding the location data. If there is a relationship to the location/customer table, you can add a calculated column and use RELATED to bring it over. If no relationship, you could use LOOKUPVALUE.
Regards,
Pat
2 Replies
- mahoneypatMicrosoft Employee
Why do you need calculated tables at all? Can't you just have Date, Customer, and Location tables in your model and get your result with measures alone? In any case, to answer the questions, more info needed on the table holding the location data. If there is a relationship to the location/customer table, you can add a calculated column and use RELATED to bring it over. If no relationship, you could use LOOKUPVALUE.
Regards,
Pat- AnonymousNot applicable
Thanks. RELATED worked fine for me since there is a relationship between tables.