Forum Discussion
Count filtering
Hi Anonymous ,
You can use the below measure.
In case it does not help, please provide additional information and mark me with @
- Anonymous6 years agoNot applicable
Anonymous it actually works when i use a Slicer for Name, but i need it to work with a Project Slicer. Example: in a slicer for project a choose A then the card will show the total projects of the person for the Project A in this case 3 projects.
Thanks
- Petazo6 years agoHelper I
Hello:
If I understood correctly, you need something like this
Targeted Photos
Untargeted Photo
The idea is that per user will show you the total of projects assigned to it, and by segmenting it shows only the user or users assigned to the project with all the pro-tests assigned
Is that all right? The formula is in the picture.
I'm reviewed.
Best regards
- Anonymous6 years agoNot applicable
Hi Anonymous ,
You can use the below measure:
COUNT of Projects = VAR _cc = COUNT ( ProjectDetials[Name] ) VAR _sel = SELECTEDVALUE ( ProjectDetials[Name] ) VAR _sel1 = SELECTEDVALUE ( ProjectDetials[Project] ) VAR _name = VALUES ( ProjectDetials[Name] ) VAR _ccx = CALCULATE ( COUNT ( ProjectDetials[Project] ), FILTER ( ALL ( ProjectDetials ), ProjectDetials[Name] = _name ) ) return SWITCH ( TRUE (), NOT ( ISBLANK ( _sel1 ) ), CONCATENATE ( CONCATENATE ( CONCATENATE ( _name, " has " ), _ccx ), " projects " ), NOT ( ISBLANK ( _sel ) ), CONCATENATE ( CONCATENATE ( CONCATENATE ( _sel, " has " ), _cc ), " projects " ), ISBLANK ( _sel ), CONCATENATE ( "Total Project ", _cc ), ISBLANK ( _sel1 ), CONCATENATE ( "Total Project ", _cc ), BLANK () )Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
- Anonymous6 years agoNot applicable
Anonymous Hi, I tried it but still the filter for name has to be marked. Also I need it to just show the value 3 and not Jose Carlos has 3 projects.
COUNT of Projects =VAR _cc =COUNT ( Lider[Líder] )VAR _sel =SELECTEDVALUE ( Lider[Líder])VAR _sel1 =SELECTEDVALUE ( Lider[Proyecto] )VAR _name =VALUES ( Lider[Líder] )VAR _ccx =CALCULATE (COUNT ( Lider[Proyecto] );FILTER (ALL ( Lider );Lider[Líder]=_name))returnSWITCH (TRUE ();NOT ( ISBLANK ( _sel1 ) );CONCATENATE (CONCATENATE ( CONCATENATE ( _name; " has " ); _ccx );" projects ");NOT ( ISBLANK ( _sel ) );CONCATENATE (CONCATENATE ( CONCATENATE ( _sel; " has " ); _cc );" projects ");ISBLANK ( _sel );CONCATENATE ( "Total Project "; _cc );ISBLANK ( _sel1 );CONCATENATE ( "Total Project "; _cc );BLANK ())Thanks a lot.