Forum Discussion
Help with counting and filtering
I have a table called 'CreateAReport (2)' with a field called [LastName FirstName]. I was able to get a count of how many times a person shows up in a table with the measure below:
5 Replies
- IdrissshatilaSuper User
- AnonymousNot applicable
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.- aspitalnickFrequent Visitor
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
- AnonymousNot 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