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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
bideveloper555
Helper IV
Helper IV

Recuento de un nivel de grupo porcentual distinto

Hola

estoy trabajando devops conjunto de datos en power bi. Si está familiarizado con la tabla de revisión de elementos de trabajo.

necesito mostrar el porcentaje de subgrupo basado en el progreso de la tarea.

a continuación se muestra un conjunto de datos de ejemplo.

workitemidEstadoEtiquetaiscurrent
1ActivoSql
1ActivoSqlno
2CompletadoSsis
3en progresoSsrs
3en progresoSsrsno
4CompletadoSql
4CompletadoSqlno
5ActivoSql
6CompletadoSql
7ActivoSsis

después del pivote

Actual
SqlSsisSsrsTotal
Activo21 3
Completado21 3
en progreso 11

Porcentaje

Actual
SqlSsisSsrstotla
Activo50.00%50.00%0.00%42.86%
Completado50.00%50.00%0.00%42.86%
en progreso0.00%0.00%100.00%14.29%

Lo que estoy tratando de lograr en power bi:

un gráfico que puede mostrar el porcentaje de elementos completados en nombre de etiqueta

O

mostrando total no. elementos por nombre de etiqueta con porcentaje de elementos completados.

ejemplo: para sql : gráfico se verá como 4 elementos como total y 50% completado.

Gracias

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hola @bideveloper555 ,

Puede crear una medida con la siguiente fórmula para obtener el porcentaje completado de por etiqueta:

Completed % of per tag = 
VAR ccount =
    CALCULATE (
        DISTINCTCOUNT ( 'work items revision'[workitemid] ),
        FILTER (
            'work items revision',
            'work items revision'[Tagname] = MAX ( 'work items revision'[Tagname] )
                && 'work items revision'[Status] = "Completed"
                && 'work items revision'[iscurrent] = "Yes"
        )
    )
VAR fcount =
    CALCULATE (
        DISTINCTCOUNT ( 'work items revision'[workitemid] ),
        FILTER (
            'work items revision',
            'work items revision'[Tagname] = MAX ( 'work items revision'[Tagname] )
        )
    )
RETURN
    DIVIDE ( ccount, fcount )

completed percentage.JPG

Saludos

Rena

View solution in original post

Anonymous
Not applicable

Hola @bideveloper555 ,

Puede crear una columna o medida calculada con las siguientes fórmulas:

Measure = 
    IF (TODAY () >= MAX('Sprints'[Startdate])
        && TODAY () <= MAX('Sprints'[Enddate]),
    CONCATENATE ( "Current ", MAX('Sprints'[Sprint]) ),
    MAX('Sprints'[Sprint]))

O

Column = 
IF (
    TODAY () >= 'Sprints'[Startdate]
        && TODAY () <= 'Sprints'[Enddate],
    CONCATENATE ( "Current ", 'Sprints'[Sprint] ),
    'Sprints'[Sprint]
)

Different percentage group level count--case when.JPG

Saludos

Rena

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hola @bideveloper555 ,

Puede crear una medida con la siguiente fórmula para obtener el porcentaje completado de por etiqueta:

Completed % of per tag = 
VAR ccount =
    CALCULATE (
        DISTINCTCOUNT ( 'work items revision'[workitemid] ),
        FILTER (
            'work items revision',
            'work items revision'[Tagname] = MAX ( 'work items revision'[Tagname] )
                && 'work items revision'[Status] = "Completed"
                && 'work items revision'[iscurrent] = "Yes"
        )
    )
VAR fcount =
    CALCULATE (
        DISTINCTCOUNT ( 'work items revision'[workitemid] ),
        FILTER (
            'work items revision',
            'work items revision'[Tagname] = MAX ( 'work items revision'[Tagname] )
        )
    )
RETURN
    DIVIDE ( ccount, fcount )

completed percentage.JPG

Saludos

Rena

Thank you.

i will use this code.

 

am really sorry to be pain.

 

can i ask you bit of favour.How to convert SQL statment as below to DAX.

 

SQL statment : Case when getdate() between startdate and enddate then 'Current'+sprintname else  sprintname END.

 

As i have  few sprints (past,current and future) using current date, i need to deferentiate which sprint is current dynamically.

Example:

Sprint1

sprint2

sprint3

 

As of today sprint 2 is current sprint. but in week time,sprint 3 will be current.

 

Have a great day 🙂

Thanks.

 

Anonymous
Not applicable

Hola @bideveloper555 ,

Puede crear una columna o medida calculada con las siguientes fórmulas:

Measure = 
    IF (TODAY () >= MAX('Sprints'[Startdate])
        && TODAY () <= MAX('Sprints'[Enddate]),
    CONCATENATE ( "Current ", MAX('Sprints'[Sprint]) ),
    MAX('Sprints'[Sprint]))

O

Column = 
IF (
    TODAY () >= 'Sprints'[Startdate]
        && TODAY () <= 'Sprints'[Enddate],
    CONCATENATE ( "Current ", 'Sprints'[Sprint] ),
    'Sprints'[Sprint]
)

Different percentage group level count--case when.JPG

Saludos

Rena

Hi

That's worked beautifully. 

Is there way I can define previous sprint, current and future sprint based on start and end dates. 

Below dates are as example. 

1st of May to 5th May 1st sprint

6th May to 10th May previous sprint

11th May to 15 May current sprint 

16th May to 20tj May 4th sprint. 

 

But this will change as dates move on. 

 

Thanks in advance. 

I will look into those resource hopefully this week. 

 

 

Hi

Thank you. 

I figured out using your previous code. 

No worries. 

 

Gracias.

¿Es la forma en que puedo convertir la instrucción SQL en DAX.

cualquier recurso para obtener más información sobre DAX (se recomienda)

Anonymous
Not applicable

Hola @bideveloper555,

No hay ninguna herramienta directa para convertir la instrucción SQL a DAX... Le sugiero que revise el contenido en los siguientes sitios web para aprender DAX:

https://dax.guide/

https://www.sqlbi.com/guides/dax/

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns

Saludos

Rena

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.