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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PranavKhedkar
New Member

Duplicate values are causing summation

I have a table which contains the columns: id, Title and Rating. 'id' has unique values, 'Title' has names of movies and TV shows and 'Rating' has their IMDB score(out of 10). I want to create a clustered bar chart which shows titles of the movie or show against their ratings. The problems occurs due to duplicated values in title. If three titles are the same,for eg. 'The gift', the bar chart will add the ratings which will exceed 10. I want to show the same title with their respective scores seperately. I tried to lose the sum but the option 'Don't Summarize' doesn't show in the option

PranavKhedkar_0-1704951991036.pngPranavKhedkar_1-1704952040488.png

How do approach this?

1 ACCEPTED SOLUTION
barritown
Super User
Super User

Hi @PranavKhedkar,

Should I approach such a problem, I'd create an additional column with an alternative name and use it for my bar chart. 

Like that, for example:

barritown_0-1704956431395.png

DAX code in plain text:

Alt Title = 
VAR CurrentTitle = [Title]
VAR MoviesWithThisName = COUNTROWS ( FILTER ( Movies, [Title] = CurrentTitle ) )
RETURN IF ( MoviesWithThisName > 1, [Title] & " (ID " & [ID] & ")", [Title] )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

View solution in original post

2 REPLIES 2
PranavKhedkar
New Member

Thank You!

barritown
Super User
Super User

Hi @PranavKhedkar,

Should I approach such a problem, I'd create an additional column with an alternative name and use it for my bar chart. 

Like that, for example:

barritown_0-1704956431395.png

DAX code in plain text:

Alt Title = 
VAR CurrentTitle = [Title]
VAR MoviesWithThisName = COUNTROWS ( FILTER ( Movies, [Title] = CurrentTitle ) )
RETURN IF ( MoviesWithThisName > 1, [Title] & " (ID " & [ID] & ")", [Title] )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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