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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Jsch2
Regular Visitor

Show status in table by proyect in list

Dear community, 

I have a table with a list of proyect. Each proyect have a status like "Complete" or "In progress". So, i need to list this status by proyect in a simple table but with the dax measure cant do that. Obviously i have a mistake in dax but i dont know how solve this.

Important: each proyect is called from different Excel tables.

 

The proyect summary table and the think that i need to show is:

 

Proyect (summary of list of protect)Status (i need to show)
Proyect 1Complete
Proyect 2In progress
Proyect 3In progress
..
..
Proyect nComplete

 

The think that i try: 

I take the status of single proyect with this dax measures:

 

ESTATUS PROYECTO 1=
VAR estatus_protecto1=
IF(OR (
SUM(estatus_proyecto[STATUS]) = 68,
(CALCULATE(COUNTA(estatus_proyecto[STATUS]),estatus_proyecto[STATUS] = 1)) = 0
          )
,"Cerrado","En proceso")
 
return estatus_proyecto1

 

The first statement is a SUM function. If SUM of the column estatus_proyecto is 68 or in each row dont have a 1 value return "Complete", else "In progress". If i put this function out of table, the result is correct. 

 

When i build a advanced dax function with the function SELECTEDVALUE and SWITCH, the result is a wrong visualization. 

This dax measures is: 

 

ESTATUS GENERAL =
VAR estatus_proyectoA=
IF( OR (
SUM(estatus_proyecto1[STATUS]) = 68,
(CALCULATE(COUNTA(estatus_proyecto1[STATUS]),estatus_proyecto1[STATUS] = 1)) = 0
),"Cerrado","En proceso"
           )
 
VAR estatus_proyectoB=
IF(OR(
SUM(estatus_proyecto2[STATUS]) = 68,
(CALCULATE(COUNT(estatus_proyecto2[STATUS]),estatus_proyecto2[STATUS] = 1)) = 0
),"Cerrado","En proceso"
         )


VAR Seleccion =
SWITCH(
SELECTEDVALUE(Tabla15[Proyectos]),
"Proyecto1",estatus_proyectoA,
"Proyecto2",estatus_proyectoB
             )
return Seleccion

 

 

The result is the next table: 

 

ProyectStatus with dax measuresCorrect status
Proyect1In progressComplete
Proyect2In progressIn progress
Protect3In progressComplete
ProtectnCompleteIn progress

 

Please, i need you help . Since last week cant finish this report because of this.

Thanks a lot

Best regards

 

 

1 REPLY 1
v-luwang-msft
Community Support
Community Support

Hi @Jsch2 ,

Could you pls share your pbix file?Remember to romove confident informations.

 

Best Regards

Lucien

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors