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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
DandyTheBeauty
New Member

Multiple values Duplicating Rows

Hi all - having an issue where I have a column from one table (OpportunitiesView[OpportunityName]) and a column from a different table (CalendarEventsView[Subject]).  As you can see the table is showing the OpportunityName for every instance of Subject (see Monarch White Marsh as an example).  I would like to only have one line for OpportunityName with the Last instance of Subject showing up (there is no date/time field related to Subject).  See below:

DandyTheBeauty_4-1724957481317.png

When I change this to show "Last" it takes the last item in the Subject column and applies it to every OpportunityName, like this:

DandyTheBeauty_5-1724957560447.png

I'm guessing this has something to do with the relationship of the tables but I'm a bit of a novice with this stuff.  Any insights would be appreciated.  Thanks!

 

6 REPLIES 6
Anonymous
Not applicable

Hi, @DandyTheBeauty 

 

Have you solved your problem? If not resolved, can you tell us your desired output?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TheoC
Super User
Super User

Hi @DandyTheBeauty 

 

Attached is a PBIX file with an output that I hope you are after.  I've added it as a Calculated Column and as a Measure for you.

 

The measure is as follows (and calculated column is identical, too):

 

LastSubjectMeasure = 

CALCULATE (
    LASTNONBLANK ( OpportunitiesView[Subject] , 1 ) ,
    ALLEXCEPT ( OpportunitiesView , OpportunitiesView[OpportunityName] )
)

 

As you can see in the output, there is only now a single instance.

 

TheoC_0-1724959885243.png

 

 

Hope this helps 🙂

 

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thank you for your response Theo, but this gives me the same result as in my first screenshot above.  I think the problem is that in your measure you have OpportunitiesView[subject].  Subject is not in OpportunitiesView, it is in a separate table called CalendarEventsView.  Accordingly, I changed your code above to:

LastSubjectMeasure =

CALCULATE (
    LASTNONBLANK ( CalendarEventsView[Subject] , 1 ) ,
    ALLEXCEPT ( OpportunitiesView , OpportunitiesView[OpportunityName] )
)

This gives me the same result as in my orginal post.

Hi @DandyTheBeauty 

 

I'm not sure that it provides you with the same output as your screenshot.  In the PBIX file I provided, my measure only provides the first instance where yours provides all instances.

 

TheoC_0-1725212071426.png

 

For example, if you look at Opportunity Name on the left, in your version, you have three records for Monarch White Marsh in your version. However, in my measure, there's only one instance which is the latest version.

 

If this is not what you're after, could you kindly explain the output you are wanting?

 

Thanks heaps,

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Hi @TheoC - I appreciate your continued engagement.  What you have shown above is exactly what I'm looking for.  However, in your PBIX file, for both the measure and column that you created you have the following:

DandyTheBeauty_0-1725458574143.png

As you can see - the 'Subject' column is not in the OpportunitiesView table.  It is in the CalendarEventsView table, and so this won't work.  In your PBIX file you have the 'Subject' column in the OpportunitiesView table.   

 

Hi @DandyTheBeauty 

 

The red underscore in your image is suggesting that the column Subject does not exist in the OpportunitiesView table in my PBIX file. It's likely this was removed / adjusted accidentally.

 

I have double checked the attached PBIX version so it won't have this error.  Not sure why it appeared on your version but hopefully that is going to be sorted in the attached.

 

Thanks heaps and glad it helped!

 

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors