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
Lotam
Helper I
Helper I

Calcular la emisión de la suma : X proyectos - 0 cargas

¡Buenos días!

Trabajo en 800 proyectos que son cargados con FTE (equivalente a tiempo completo) por los gerentes y enviados entre 50 archivos (para los 50 gerentes).

Algunos proyectos tienen 0 FTE como un total, mientras que algunos proyectos tienen algunas contribuciones de algún gerente, pero no todos ellos.

Me gustaría calcular el número de contribuciones que faltan por parte de los gerentes.

Para el ejemplo : - Proyecto 1 - 5 contribuciones faltantes. Indica que los equipos son los siguientes (X1 ; X2 ; ...)

He intentado hacerlo en el siguiente archivo, primera página "Colaboradores desaparecidos por entidades" con la fórmula:

"N-projets non-chargés - CALCULATE(COUNT('Charges'[N_Projet]), FILTER(Charges,[SOMETPS22020]-0))"

Pero lo que obtengo son una gran cantidad de proyectos, que no son correctos. Me temo que está contando el número de 0 en mis archivos principales donde el 0 aparece a un máximo de 66 veces por proyectos porque se expresa por meses (66 meses), y quiero saber si un proyecto tiene 0 cargo como un total de esos 66 meses.

Aquí está el enlace a mi archivo : https://www.swisstransfer.com/d/ac8d5573-55a0-402d-8ce4-9d6ddaccb21e

Por favor, dime si no era lo suficientemente claro o necesito imputar más información. Sigo buscando una solución y pondré la solución si finalmente la encuentro elswhere.

Muchas gracias por su ayuda apreciada !

Saludos
Marc

2 ACCEPTED SOLUTIONS

@Lotam

Prueba esta nueva versión. Algo complicado estaba pasando. El resultado es ahora 4 para el caso mencionado:

N-projets non-chargés V4 =
COUNTROWS (
    FILTER (
        CALCULATETABLE (
            DISTINCT ( 'Charges'[N_Projet] ),
            Charges[Itération_PdC] = "S2-2020"
        ),
        CALCULATE ( SUM ( Charges[Charges] ) = 0 )
    )
)

Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.

Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.

Salud

SU18_powerbi_badge

View solution in original post

@Lotam

Siento no haber podido responder antes. Prueba esta nueva medida que usa la que ya teníamos:

N-projets non-chargés V4_TOT =
SUMX ( DISTINCT ( Charges[Groupe_Contributeur] ), [N-projets non-chargés V4] )

Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.

Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.

Salud

SU18_powerbi_badge

View solution in original post

13 REPLIES 13
amitchandak
Super User
Super User

@Lotam , Pruebe una medida como

countx(filter(summarize('Charges','Charges'[N_Projet],"_1",[SOMETPS22020]),[_1]-0),[N_Projet])
O
countx(filter(summarize('Charges','Charges'[N_Projet],"_1",[SOMETPS22020]+1),[_1]-0),[N_Projet])

Hello @amitchandak ,

 

Thank you for your answer.

 

I tried both calculation, but It did not fit what it should look like. As I have a great difference between what PBI shows me and the reality (160 projects with 0 FTE, but my files will show me 11).

 

Still, thank you very much, I'll keep looking and using your calculation to try to find my answer.

 

Lotam

AlB
Super User
Super User

Hola @Lotam

¿Cuál es el resultado esperado? No entiendo completamente la lógica para el cálculo, pero pruebe esto:

N-projets non-chargés V3 = COUNTROWS(FILTER(DISTINCT('Charges'[N_Projet]), [SOMETPS22020]=0))

Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.

Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.

Salud

SU18_powerbi_badge

I think I found out but I am unsure on how to correctly do it in the formula.

 

PowerBI may not being rounding up some numbers. The total may be of 0,4 and PowerBI counts it as a 0.

I don't seem to be able to use the Roundup formula correctly (if it is this one).

 

Plus, I also think PowerBI counts my first row (which is the headtitle of my board in excel) as one project being 0.

 

Do you know how to counter this?

Thank you,
Lotam

It seems I keep trying to answer you and the forum denies it !

 

Hello @AlB ,

 

Thank you for your answer.

I am trying to count the number of projects with 0 FTE so I can have a good picture of the amount of work for each manager that still has to be done.

Your solution works, but not perfectly as I have a difference of 2 or 3 in my results :
Expected 16

PowerBI : 18

 

Does that mean that Countrows is counting additionnal rows? But I can't seem to find out where or why. I will keep looking.
If you have the answer, please do enlight me !

Thank you again,

Lotam

@Lotam

¿Dónde/cómo estás usando mi medida? Si lo pongo en una tarjeta visual en el archivo que compartiste obtengo un resultado de 406. ¿De dónde sacas el 18?

Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.

Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.

Salud

SU18_powerbi_badge

Sorry, if its in a card its indeed 406 as a total.

18 was from one of the files out of 50 (easier to count).

Your answer is the best one I have, even if its not 100% accurate.
I still don't know why its not. Maybe it should be a Distinctcount?

Regards,

Lotam

@Lotam

¿Qué archivo estás mirando? Envíeme un pbix con el escenario que tiene ahora (con 18 como resultado) o dígame cómo compilarlo con el archivo que compartió anteriormente. Entonces puedo echar un vistazo.

Por cierto, ¿por qué algunos de los números en el "Itération_PdC" son tan pequeños?

Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.

Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.

Salud

SU18_powerbi_badge

@AlB 

For example, in the PBI file, I have in "Contributeurs manquants par Entités" a blue square called "DEP" with a display in ring in it. There is "PLM" in it and when over it it displays 7.

 

In the Excel file, it is "DEP_DPI_PLM". I have put a sum of each rows at the end of them. I only have 4 with a total of 0 (in red).

 

So there is a discrepancy of 3. 

 

Some numbers in the "Itération_PdC" are very small because of the way I need it to be input (for further extraction for entities of my employer).


Gratefuly 

Lotam

 

 

https://www.swisstransfer.com/d/c3829a86-7617-48f2-8362-d64613c073e3 

@Lotam

Prueba esta nueva versión. Algo complicado estaba pasando. El resultado es ahora 4 para el caso mencionado:

N-projets non-chargés V4 =
COUNTROWS (
    FILTER (
        CALCULATETABLE (
            DISTINCT ( 'Charges'[N_Projet] ),
            Charges[Itération_PdC] = "S2-2020"
        ),
        CALCULATE ( SUM ( Charges[Charges] ) = 0 )
    )
)

Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.

Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.

Salud

SU18_powerbi_badge

Thank you very much @AlB !

 

This does it very nicely. With your solution, a collegue of mine and I tried to complete it just a bit with a visualisation to sum up the numbers of rows with 0 charges.

 

For example, for each boxes (DEP, MEI, PPI, MSP and DIR) have the total of all rows with 0.
DEP should be 26+15+11+6+4+4+2+1 =68.

Unfortunatly we stalled while trying the following :

 
N-projets non-chargés V5 =
COUNTROWS (
FILTER(
IF(AND (Charges[Itération_PdC] = "S2-2020", Charges[Groupe_Contributeur]="IST"
),(CALCULATETABLE (
DISTINCT ( 'Charges'[N_Projet] )))),
CALCULATE ( SUM ( Charges[Charges] ) = 0 )
)
)

 

Would you have an idea?

Again thank you, I have marked the post as having being solved !

 

Best regards,
Lotam

@Lotam

Siento no haber podido responder antes. Prueba esta nueva medida que usa la que ya teníamos:

N-projets non-chargés V4_TOT =
SUMX ( DISTINCT ( Charges[Groupe_Contributeur] ), [N-projets non-chargés V4] )

Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.

Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.

Salud

SU18_powerbi_badge

@AlB  Thank you again, my colleague and I were dumbfounded by the simplicity ! It works like a charm.

 

Thank you again !

 

Regards, Lotam

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.