Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

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.

 

1 ACCEPTED SOLUTION
mahoneypat
Employee
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





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Employee
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





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thanks. RELATED worked fine for me since there is a relationship between tables.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.