Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Count is not correct after after a visual filter

Hi:

I have a table with the next data:

Device name, time when the device was operated, # of operations

lsalas_0-1653675035925.png

I added a table  to count how many times the device recorded  an operation. In this case,

Device2 was operated 6 times and

Device4 was operated 1  time
I added another visual to know the total of devices:  In this case 2 devices: 

(The count depend on the time range indicated by the slicer)

lsalas_2-1653675300542.png

My issue is when I added a filter to the visual table to show only devcies that have been operated more than 1. The Count is not updated. It should  be 1. How can I do to count the devices based in the filter on the visual table? 

lsalas_3-1653675480844.png

 

 

Thank you.

 

 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

In your screenshot, the fillter condition only apply on one visual. as count of Device , it don't have filter.

vyalanwumsft_0-1653963975522.png

vyalanwumsft_1-1653964070658.png

so we could create a measure on another visual to keep sync.

cout = CALCULATE(DISTINCTCOUNT('Table'[Device]),FILTER('Table', CALCULATE(COUNT('Table'[Device]),ALLEXCEPT('Table','Table'[Device]))>1))

The final show:

vyalanwumsft_2-1653964435192.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

In your screenshot, the fillter condition only apply on one visual. as count of Device , it don't have filter.

vyalanwumsft_0-1653963975522.png

vyalanwumsft_1-1653964070658.png

so we could create a measure on another visual to keep sync.

cout = CALCULATE(DISTINCTCOUNT('Table'[Device]),FILTER('Table', CALCULATE(COUNT('Table'[Device]),ALLEXCEPT('Table','Table'[Device]))>1))

The final show:

vyalanwumsft_2-1653964435192.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Thank you! It is was I needed. It is working perfectly.

ribisht17
Super User
Super User

@Anonymous 

 

You can just make use of the simple measure here, Why do we need a Table?

 

ribisht17_0-1653722035503.png

 

Count of Device = (DISTINCTCOUNT(Device[Device]))

 

Thanks,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

 

Anonymous
Not applicable

Thank you @ribisht17 , but that measure is not enough. I need to apply a filter to the count as @ v-yalanwu-msft mentioned. 

 

tamerj1
Super User
Super User

Hi @Anonymous 

what is the current code of the measure?

Anonymous
Not applicable

Hi:

 

I dont have any measure. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.