cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bobmarley
Frequent Visitor

Dax count total occurrences without any filter

Hi there,

 

I have a following data.

Untitled.png

I want to count total occurrence of the selected character from column1 regardless of any visual level, page level or report level filters. for eg. If i select character 'a' from column1 and number '2' from column2 in visual level filter power bi calculates count as 2 but there are total 4 'a' in column1. So I want total count as 4 not 2 i.e. ignoring any filter apply on that column or with respect to other columns. How can I achieve this in power bi using dax?

1 ACCEPTED SOLUTION
v-yuezhe-msft
Microsoft
Microsoft

@bobmarley,

Based on your sample data, the total count of a is 5. Create the following measure in your  table.

Measure  = CALCULATE(COUNTA(Table[Column1]),ALLEXCEPT(Table,Table[Column1]))



Regards,

Lydia

Community Support Team _ Lydia Zhang
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

2 REPLIES 2
v-yuezhe-msft
Microsoft
Microsoft

@bobmarley,

Based on your sample data, the total count of a is 5. Create the following measure in your  table.

Measure  = CALCULATE(COUNTA(Table[Column1]),ALLEXCEPT(Table,Table[Column1]))



Regards,

Lydia

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

Hi Lydia, thanks for your reply.

 

I have a similar issue but backwards. If I dont use any filter the formulas calculates the duplicates correctly, but as soon as I apply any slicer in the visual, the value remains calculating over the full table without filters. The issue in my case is that if I apply filters the calculation changes. Any clue on this one?. Thanks

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!