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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

INDEX para mesa con DAX

Hola

Quiero crear un índice con DAX para la siguiente tabla. Pero no pude crear una columna porque trabajar en Direct Query. Por eso necesito una solución diferente.
El índice que se creará con DAX debe clasificarse con los precios de cantidad y venta. El precio de venta y la cantidad son directamente proporcionales; cuando uno de ellos aumenta otro también aumenta.

Screen Shot 2020-04-24 at 18.31.05.pngEl out de DAX

Screen Shot 2020-04-24 at 18.15.51.png

7 REPLIES 7
v-zhenbw-msft
Community Support
Community Support

Hola @MSTCR ,

Podemos usar la siguiente medida para obtener un índice.

index = 
IF (
    HASONEVALUE ( 'Table'[CHAN] ), 
    RANKX ( ALLSELECTED ( 'Table'[CHAN], 'Table'[QUANTY] ), [SALES PRICE] )
)

El resultado así,

index 1.jpg

Saludos

Equipo de Apoyo comunitario _ zhenbw

Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Anonymous
Not applicable

Hola @v-zhenbw-msft ,

¿Podrías compartir pbix conmigo?
Parece que funciona, pero en mi escritorio no funciona, aunque he comprobado mucho mi código.

Gracias, H.

Greg_Deckler
Super User
Super User

No estoy seguro de entituirlo. Pero, tal vez echa un vistazo

Para *Bleep* con RANKX!


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User
parry2k
Super User
Super User

@MSTCR Entonces, ¿qué es exactamente lo que busca, una columna de índice? ¿Cómo planeas usarlo? ¿Supongo que el precio de venta es una medida?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Sí, el precio de venta es de medida. Quiero agregar la columna de índice para power bi visual en la parte anterior.
az38
Community Champion
Community Champion

Hola @MSTCR

de acuerdo con la biblia radacad RANKX de @amitchandak enlace, puede tratar de crear una medida como

 RANKX(
  ALL('Table') ,
  CALCULATE(
   SUM('Table'[Sales Price])
   )
 )

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors