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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
Employee

@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
Employee
Employee

@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 Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.