Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello forum,
I'm looking for a possible solution for the following problem. I need to access the umpteenth column of the table generated from the TOPN function. I read in the Power BI documentation about the LASTNONBLANK function, however in its implementation it does not work with the generated table. Any solution?
Below I share the code generated for the particular measure
Clarifications
The total_streams column contains the plays of each of the songs in the dataset. The information is obtained from the intersection of the Song, Streams, Artist and Calendar tables.
Solved! Go to Solution.
Segundo_Artista =
VAR Streams_Artista =
SUMMARIZE(
'Song - Streams - Artist - Calendar',
'Song - Streams - Artist - Calendar'[nombre_artista],
"Streams Totales", SUM('Song - Streams - Artist - Calendar'[total_streams])
)
VAR Top_2 =
TOPN(2, Streams_Artista, [Streams Totales], DESC)
VAR Second_Artist_Table =
TOPN(1, TOPN(2, Streams_Artista, [Streams Totales], DESC), [Streams Totales], ASC)
VAR Segundo_Artista =
SELECTCOLUMNS(Second_Artist_Table, "nombre_artista", 'Song - Streams - Artist - Calendar'[nombre_artista])
RETURN
CONCATENATEX(Segundo_Artista, [nombre_artista], ", ")
Segundo_Artista =
VAR Streams_Artista =
SUMMARIZE(
'Song - Streams - Artist - Calendar',
'Song - Streams - Artist - Calendar'[nombre_artista],
"Streams Totales", SUM('Song - Streams - Artist - Calendar'[total_streams])
)
VAR Top_2 =
TOPN(2, Streams_Artista, [Streams Totales], DESC)
VAR Second_Artist_Table =
TOPN(1, TOPN(2, Streams_Artista, [Streams Totales], DESC), [Streams Totales], ASC)
VAR Segundo_Artista =
SELECTCOLUMNS(Second_Artist_Table, "nombre_artista", 'Song - Streams - Artist - Calendar'[nombre_artista])
RETURN
CONCATENATEX(Segundo_Artista, [nombre_artista], ", ")
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |