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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.