Forum Discussion
Help with counting and filtering
Hi aspitalnick ,
Please refer to the following steps.
The test data is as follows.
Create a table including the count measure and the 'LastName FirstName' field.
Table = DISTINCT(SELECTCOLUMNS('CreateAReport (2)',"LastName FirstName",[LastName FirstName],"Years_count",[Years_count]))
Use the Years_count field to create a slicer.
Create a measure to be used as a visual level filter.
Measure = IF([Years_count] IN VALUES('Table'[Years_count]),1,0)
Place this measure in the visual's filter and set it to is 1.
In this way, the Years_count slicer can filter other visuals.
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I created the table and plugged in the formula, but it has the years_count as 1, like it is counting the names after the distinct
- Anonymous1 year agoNot applicable
Hi aspitalnick ,
Can you provide sample pbix files? We can better understand the problem and help you.
How to provide sample data in the Power BI Forum - Microsoft Fabric CommunityPlease remove any sensitive data in advance. If uploading pbix files please do not log into your account.
Best Regards,
Dengliang Li- aspitalnick1 year agoFrequent Visitor
I can't is has sensitive information, but thank you for offering to help.