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
hobosapien
Frequent Visitor

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
Frequent Visitor

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

View solution in original post

2 REPLIES 2
hobosapien
Frequent Visitor

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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