Forum Discussion
Countrows without selection
- 1 year ago
Hi Marinus,
Thanks for your update.
I’ve reproduced your scenario using sample data matching your raw data structure and achieved the expected output. Create the fallowing dax measure to calculate countrows.
rows = CALCULATE( COUNTROWS( FILTER(ALL('table'), NOT('table'[Aanvraag_Routelint] IN { "Zvg -", "Vlgr -", "Rsdg -", "Odzg -", "Edng -", "Bdlg -", "Svgg -" }) ) ) )The .pbix file attached demonstrates this working solution with your sample data.
If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hello Marinus,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Please try the following DAX measure. I assume that your column contains additional text after the "-" character.
CALCULATE(
COUNTROWS('Overzicht aanvragen'),
FILTER(
'Overzicht aanvragen',
NOT (
LEFT('Overzicht aanvragen'[Aanvraag_Routelint], SEARCH(" -", 'Overzicht aanvragen'[Aanvraag_Routelint] & " -") - 1)
IN { "Zvg", "Vlgr", "Rsdg", "Odzg", "Edng", "Bdlg", "Svgg" }
)
)
)
If the issue persists, kindly share a sample dataset along with the expected output. This will help in better understanding the problem and finding an appropriate solution.
If you find this information helpful, please consider "Accepting it as a solution" and giving it a "kudos" to assist other community members facing similar challenges.
Thank you.
I have deleted the dashes to make it clearer.
I have a command to countrows with a specific tekst :
CALCULATE(
COUNTROWS('Overzicht aanvragen'),
'Overzicht aanvragen'[Aanvraag_Routelint] IN { "Zvg", "Vlgr", "Rsdg", "Odzg", "Edng", "Bdlg", "Svgg" }
)
This way i count only the rows with these texts in it, but now i want to count the rows without these specific texts in it.
- v-ssriganesh1 year agoCommunity Support
Hi Marinus,
Thanks for your update.
I’ve reproduced your scenario using sample data matching your raw data structure and achieved the expected output. Create the fallowing dax measure to calculate countrows.
rows = CALCULATE( COUNTROWS( FILTER(ALL('table'), NOT('table'[Aanvraag_Routelint] IN { "Zvg -", "Vlgr -", "Rsdg -", "Odzg -", "Edng -", "Bdlg -", "Svgg -" }) ) ) )The .pbix file attached demonstrates this working solution with your sample data.
If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.