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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Help_Please
New Member

ADD NEW COLUMN with DAX throwing error

I have created a PBIX File on desktop with multiple tables. Out of those I have created an active relationship between 2 tables, Table A & Table B. Relationship between A&B is Many to One (Both) cardinality

Now I added a NEW COLUMN in Table A and entered a DAX Formula which comprises of multiple conditions (refer formula below) using Columns from both Tables A&B. The same formula worked in another PBIX File with a different data set.

However, despite both tables having an active relationship, the DAX formula is not suggesting Table B or any of it's Columns, so despite my formula being correct the result is an error with incomprehensible errors. Please help.

Please Note-

-Relationship Active

-All Columns in Text Format

-No data related errors upon refresh

-Tables refreshed both in Transform, front end as well in the Relationship Model

-Checked for duplications, blanks, etc. No data discrepancies

 

-DAX Formula is 

New Column = MAXX(FILTER(
'TABLE A','TABLE A'[Date]>='TABLE B'[Migration Date]&&
'TABLE A'[Date]<='TABLE B'[Exit Date]&&
'TABLE A'[Unique Code]='TABLE B'[Unique Code]&&
'TABLE A'[Cluster Code]='TABLE B'[Cluster Code]),
'TABLE B'[Name])

4 REPLIES 4
govindarajan_d
Super User
Super User

Hi @Help_Please,

 

Can you try like this:

New Column = MAXX(FILTER(
'TABLE A','TABLE A'[Date]>=RELATED('TABLE B'[Migration Date])&&
'TABLE A'[Date]<=RELATED('TABLE B'[Exit Date])&&
'TABLE A'[Unique Code]=RELATED('TABLE B'[Unique Code])&&
'TABLE A'[Cluster Code]=RELATED('TABLE B'[Cluster Code])),
'TABLE B'[Name])

Thank you for your response.

I did actually try the formula mentioned by you but unfortunately it is not giving the correct return values so although it doesn't throw an error but it is also not able to give me accurate results. I was wondering if there is a bug and if there was a way to diagnose that in my PBIX File. 

Hi @Help_Please,

 

You are trying to run the MAXX function on name. Any specific reason?

Can you provide the pbix file with sensitive data removed?

MAXX function I have used as an aggregator function so that it can return the exact value basis the conditions set. Somehow this formula works in another PBIX file but this file it is not able to return value. It's because it is not able to read the Table B and it's columns. I feel if I can resolve that the formula would also start working.

About sharing PBIX File, unfortunately, my company policies do not permit us to share any information including files with dummy data with outside company 😞

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.