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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
hobosapien
Helper I
Helper I

Adding an additional column to a table with an existing measure breaks it

I have a table with the columns 'artist_name' and 'album_name'. I created a simple measure to count the number of times an album was played and then used the TopN visual filter. The first image is the result.
 
Count Album Name = COUNT(SpotifyExtended[album_name])
 

hobosapien_1-1717729057629.png

I then added artist_name thinking I would be able to maintain the topN album_name listing but with the artist name right next it. However it expands out the album name mulitple times as you can see in the screenshot below. Why is this? And how can I show the singular artist_name values next to the TopN album_name list?

 

hobosapien_2-1717729080835.png

 

 

hobosapien_0-1717729038628.png

 

 

 

1 ACCEPTED SOLUTION
hobosapien
Helper I
Helper I

I realized that the data was displaying properly as there were multiple artists per album. 

View solution in original post

2 REPLIES 2
hobosapien
Helper I
Helper I

I realized that the data was displaying properly as there were multiple artists per album. 

ryan_mayu
Super User
Super User

@hobosapien 

Here is a workaround for you. I did test for top 3

 

create a measure

 

TOP 3 =
VAR _tbl=SUMMARIZE(ALL('Table (2)'),'Table (2)'[id],"sum",sum('Table (2)'[value]))
var _tbl2=FILTER(ADDCOLUMNS(_tbl,"rank",rankx(_tbl,[sum],,DESC)),[rank]<4)
VAR _LIST=CONCATENATEX(_tbl2,[id],",")
RETURN IF(CONTAINSSTRING(_LIST,MAX('Table (2)'[id])),1,0)

 

 

and add this measure the visual and set to 1

 

11.PNG

 

pls see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors