Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear community,
I need your help.
I would like to filter my measure with 2 criteria
First on the service which must always be "Contrat Assistance G" and on the category which must start with "APPRO" I know how to do it with filters on the element but I would like to make a measurement of it.
Test =Calculate(distinctcount('dossiers') ....
Here are the values for the columns
Thank you
Solved! Go to Solution.
Hi @Milozebre,
Assuming that your columns always start with the values you said then use this expression:
Count dossier =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Dossier] );
LEFT ( 'Table'[Service]; 20 ) = "Contrat Assistance G";
LEFT ( 'Table'[Categorie]; 5 ) = "APPRO"
)If the columns don't start by that text but need to have that text within the column try this one:
Count dossier =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Dossier] );
FIND ( "Contrat Assistance G"; 'Table'[Service]; 1; 0 ) > 0;
FIND ( "APPRO"; 'Table'[Categorie]; 1; 0 ) > 0
)
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Milozebre,
Assuming that your columns always start with the values you said then use this expression:
Count dossier =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Dossier] );
LEFT ( 'Table'[Service]; 20 ) = "Contrat Assistance G";
LEFT ( 'Table'[Categorie]; 5 ) = "APPRO"
)If the columns don't start by that text but need to have that text within the column try this one:
Count dossier =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Dossier] );
FIND ( "Contrat Assistance G"; 'Table'[Service]; 1; 0 ) > 0;
FIND ( "APPRO"; 'Table'[Categorie]; 1; 0 ) > 0
)
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsGood morning MFelix,
Its working.
Thnak you very much
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |