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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Clasificación de las 3 facturas más costosas de los 3 proyectos más caros

No encontró mucho en la clasificación N superior para una categoría con una granularidad más baja. Aquí, quiero clasificar los 3 facturas más caros de los 3 proyectos/asuntos más caros. Así que las facturas están en la granularidad inferior. Pude escribir la fórmula para top 3 Matters, pero traté de escribir Top N de Top N y salió absolutamente mal y terminé eliminándolo. ¿Alguna idea? Los datos se adjuntan a continuación en el enlace de Google Drive

https://drive.google.com/drive/folders/1Kcr3j1baRjdvUOIQb_rMt95eSaCS2Mvi?usp=sharing

10 REPLIES 10
Anonymous
Not applicable

Increíble. Esas fueron en realidad algunos de los materiales de referencia que utilicé, todavía era incapaz de averiguar un Top 3 facturas más caras para los 3 proyectos más caros y sorprendentemente no he visto mucho material en la comunidad en él.

Hola @beingandbrian ,

Puedes probar esto

Rank 3 = 
IF (
    ISINSCOPE ( FactInvoiceHeader[Invoice Header Key] ),
    RANKX (
        CALCULATETABLE (
            VALUES ( FactInvoiceHeader ),
            ALLSELECTED ( FactInvoiceHeader[Invoice Header Key] )
        ),
       CALCULATE(sum(FactInvoiceHeader[Invoice Net Amount]))
    ),
    IF (
        ISINSCOPE ( FactInvoiceHeader[Matter Key] ),
        VAR CC = CALCULATE(SUM(FactInvoiceHeader[Invoice Net Amount] ) )
        RETURN
            CALCULATE (
                RANKX (
                    VALUES ( FactInvoiceHeader[Matter Key] ),
                    CALCULATE(SUM(FactInvoiceHeader[Invoice Net Amount])),
                    CC
                ),
                ALLSELECTED ()
            )
    )

1.jpg

saludos

Harsh Nathani

Hola, @beingandbrian

Por favor, compruebe esta solución, espero que esto responda a la pregunta.

Top 3 Invoices in Top 3 Matters = 
VAR TOP3MAT = 
    TOPN(3,
        SUMMARIZE(
            ALL(FactInvoiceHeader[Matter Key]),
            FactInvoiceHeader[Matter Key],
            "Amount",[Total Spend X]
        ),[Amount],DESC
    )
VAR TOP3INV = 
    TOPN(3,
        SUMMARIZE(
            ALL(FactInvoiceHeader[Invoice Header Key]),
            FactInvoiceHeader[Invoice Header Key],
            "Amount",[Total Spend X]
        ),[Amount],DESC
    )
RETURN
    CALCULATE(
        [Total Spend X],
        TOP3INV,
        TOP3MAT
    )

Gracias




Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Oye. Cuando lo pongo en Matrix como en la foto de abajo, no aparece ninguna matriz, sólo consigo una rueda giratoria.

@beingandbrian

Suelte la tecla Matter en una tabla y esta medida.

Voy a comprobar la matriz

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@beingandbrian

Si necesita ver las 3 mejores importaciones y las 3 facturas principales relacionadas en función del importe en Matrix,

Utilice esta medida:

Top 3 Invoices in Top 3 Matters = 
VAR TOP3MAT = 
    TOPN(3,
        SUMMARIZE(
            ALLSELECTED(FactInvoiceHeader[Matter Key]),
            FactInvoiceHeader[Matter Key],
            "Amount",[Total Spend X]
        ),[Amount],DESC
    )
VAR TOP3INV = 
    TOPN(3,
        SUMMARIZE(
            ALLSELECTED(FactInvoiceHeader[Invoice Header Key]),
            FactInvoiceHeader[Invoice Header Key],
            "Amount",[Total Spend X]
        ),[Amount],DESC
    )
RETURN
    CALCULATE(
        [Total Spend X],
        TOP3MAT,
        KEEPFILTERS(TOP3INV)
    )


¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy cuando puse esto en una matriz con clave de materia en la parte superior de la jerarquía y clave de encabezado de factura en, sólo tengo espacios en blanco...... Publicaré una foto.

@beingandbrian

Usted debe obtener esto:

Fowmy_0-1594652887868.png

Si está satisfecho con mi respuesta, márquela como una solución para que otros puedan encontrarlo fácilmente.

¡APRECIAMOS LOS KUDOS!


Suscríbete a ExcelFort y aprende Power BI, Power Query y Excel

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy gracias el hombre trabajó muy bien.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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