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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Crear una segmentación TopN con un campo de datos


Hola

Estoy intentando crear una segmentación de datos TopN donde el usuario puede definir cuántas instancias se mostrarán. Encontré un hilo anterior publicado en este foro, pero ese hilo se refiere a otra medida para la parte de suma del problema. Me gustaría hacer referencia a un campo de datos ya incluido en la tabla de datos que voy a incluir en Power BI:

Enlace al hilo antiguo: https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

Medida creada a partir de subprocesoantiguo antiguo:

TopN City (Ciudad de TopN)
VAR SelectedTop - SELECTEDVALUE('TopN'[TopN])
devolución
SWITCH(TRUE(),
SelectedTop 0, [Importe de ventas],
RANKX (
ALLSELECTED( 'Orders'[City] ),
[Importe de ventas]
)
<- SelectedTop,
[Importe de ventas]
)

En la medida anterior, [Importe de ventas] es una medida creada. En lugar de ello, me gustaría referirme a un campo de datos específico 'Claim Data Pull'[Pagado].

Mi pregunta es, ¿es posible? ¿Hay alguna manera de manipular la medida para sumar 'Claim Data Pull'[Pagado] en lugar de [Importe de ventas]?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Siempre y cuando los datos de reclamación se conectaron con la ciudad

TopN City =
VAR SelectedTop = SELECTEDVALUE('TopN'[TopN])
RETURN
SWITCH(TRUE(),
SelectedTop = 0, calculate(sum('Claim Data Pull'[Paid])),
RANKX (
ALLSELECTED( 'Orders'[City] ),
calculate(sum('Claim Data Pull'[Paid]))
)
<= SelectedTop,
calculate(sum('Claim Data Pull'[Paid]))
)

si necesitas más ayuda hazme @

Aprecia tus felicitaciones.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Siempre y cuando los datos de reclamación se conectaron con la ciudad

TopN City =
VAR SelectedTop = SELECTEDVALUE('TopN'[TopN])
RETURN
SWITCH(TRUE(),
SelectedTop = 0, calculate(sum('Claim Data Pull'[Paid])),
RANKX (
ALLSELECTED( 'Orders'[City] ),
calculate(sum('Claim Data Pull'[Paid]))
)
<= SelectedTop,
calculate(sum('Claim Data Pull'[Paid]))
)

si necesitas más ayuda hazme @

Aprecia tus felicitaciones.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Muchas gracias.

Gracias

Andrew

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors