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

Make a sum grouped by ID

Hello there,

 

I have this table down below. I have been asked to show in a visual the total time of each ID but just the ones who managed to get to the Status "Working" (in this case the IDs 2 and 3). I know this can be done using some kind of "Filter" function variation, but I can't seem to work it out.

 

IDStatusTime
1Installing3s
1Downloading6s
2Installing2s
2Downloading4s
2Working5s
3Installing2s
3Downloading2s
3Working3s
4Installing1s
4Downloading5s

 

Any help is gladly appreciated!

 

Thanks for your time and patience,

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

maybe you can try to create a column

Column = 
VAR _check=maxx(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Status]="Working"),'Table'[Status])
return if(_check="","N","Y")

and filter by the new column

1.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
ryan_mayu
Super User
Super User

@Anonymous 

maybe you can try to create a column

Column = 
VAR _check=maxx(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Status]="Working"),'Table'[Status])
return if(_check="","N","Y")

and filter by the new column

1.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hello Ryan,

 

In fact, that is a really good way to solve it. But I've come up with some problems:

 

Measure =
VAR _check=maxx(FILTER('comms historico_estados','comms historico_estados'[nrf_nrf_id]=EARLIER('comms historico_estados'[nrf_nrf_id])&&'comms historico_estados'[estado_estado_id]=13&&'comms historico_estados'[estado_estado_id]=10),'comms historico_estados'[estado_estado_id])
return if(_check<>13 && _check<>10,"N","Y")
 
When I made the first post I gave a modified example of what I am actually working with to simplify it, but this measure is a more precise one. In this measure I've taken what you told me and tried to adapt it, but I couldn't. To be more specific, the "working" status is now a number (13) and I need it to work with two conditions: I only want the IDs which managed to get the "working" status (13) or the IDs which managed to get the imaginary status "Done" (number 10) without having passed through the "working" status.
 
I know it can be quite complicated to understand because my english is not perfect, but if you need to ask anything please feel free! I'll give as many details as I can
 
Thank you so much for your time and patience Ryan,
 
Regards

@Anonymous 

What I created is a column, not a measure. 

maybe you can try this

column=

VAR _check=maxx(FILTER('comms historico_estados','comms historico_estados'[nrf_nrf_id]=EARLIER('comms historico_estados'[nrf_nrf_id])&&('comms historico_estados'[estado_estado_id]=13||'comms historico_estados'[estado_estado_id]=10)),'comms historico_estados'[estado_estado_id])
return if(_check="","N","Y")




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

The "" part in the return clause gives me an error, I imagine because it's trying to read a string in numbers, right? What should I put instead?

 

you can try this

column=

VAR _check=maxx(FILTER('comms historico_estados','comms historico_estados'[nrf_nrf_id]=EARLIER('comms historico_estados'[nrf_nrf_id])&&('comms historico_estados'[estado_estado_id]=13||'comms historico_estados'[estado_estado_id]=10)),'comms historico_estados'[estado_estado_id])
return if(isblank(_check),"N","Y")




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Finalizados/En Garantía = 
VAR _check13=maxx(FILTER('comms historico_estados','comms historico_estados'[nrf_nrf_id]=
EARLIER('comms historico_estados'[nrf_nrf_id])&&'comms historico_estados'[Grupo Estado]="En Garantía"),'comms historico_estados'[Grupo Estado])

VAR _check10=maxx(FILTER('comms historico_estados','comms historico_estados'[nrf_nrf_id]=
EARLIER('comms historico_estados'[nrf_nrf_id])&&'comms historico_estados'[Grupo Estado]="Finalizado"),'comms historico_estados'[Grupo Estado])

return if(_check13<>BLANK(),"En Garantía",IF(_check10<>BLANK(), "Finalizado", "N"))

 Hello Ryan,

 

With some adaptations I finally managed to get it right. In the end I made it to show "Finalizado" only when the status "En garantía" isn't shown in that ID, which is what I was looking for in the beginning. You don't know how helpful you've been!

Thank you so much

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hariharan_R
Solution Sage
Solution Sage

Hi @Anonymous 

We can achieve this result in different ways. Added one option

Hariharan_R_0-1657631617815.png

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


Anonymous
Not applicable

Hello Hari!

 

First, thank you so much for your time.

 

See the thing is, in the table you end up getting there isn't a sum of all the seconds of every phase the IDs 2 and 3 pass. The ideal would be having the table you have but in the "Time" column it would appear "11s" for ID 2 and "7s" for ID 3

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.