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
Anonymous
Not applicable

Total Count in a measur

Hi all ,

I have a dashboard with some filters in the page label. The question is I have a table with number of orders and I want to count all of the orders but without taking in account the page label filter.

 

I'm doing the typical COUNT ( ordaertable'[NOE] )) but the number is not correct. How can avoid the filter only for this measure?

 
1 ACCEPTED SOLUTION

@Anonymous

 

Try using the ALLEXCEPT function:

 

CALCULATE ( COUNT ( 'ordaertable'[NOE] ),ALLEXCEPT('ordaertable', 'ordaertable'[Cod.Cliente]))

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @themistoklis and @Stachu ,

 

I test it both but the result are the same. The thing is , I have a page level filter and is showing the number related to tht filter. The same cont in other page the result is 92644 but when I apply he same count in the page that I have other filters the result is 8316.

@Anonymous

 

Can you send a few screenshots of the report and the formula that you are using?

Anonymous
Not applicable

This is the filter. Is a column of a same table of orders and only describe the kind of incidents.

 

Captura2.PNG

The query is the sames as you write :

 

CALCULATE ( COUNT ( 'ordaertable'[NOE] ), ALL ( 'ordertable'[NOE] ) )

 

@Anonymous

 

Are you sure when you try the query with the table in the ALL statement and NOT the columnname, doesnt work:

 

CALCULATE ( COUNT ( 'ordaertable'[NOE] ), ALL ( 'ordertable' ) )

Not

 

CALCULATE ( COUNT ( 'ordaertable'[NOE] ), ALL ( 'ordertable'[NOE] ) )
Anonymous
Not applicable

Hi @themistoklis,

 

Yes , without the columname is showing the full number but is repeating the same number for all the rows like this:

 

Captura3.PNG

@Anonymous

 

Try using the ALLEXCEPT function:

 

CALCULATE ( COUNT ( 'ordaertable'[NOE] ),ALLEXCEPT('ordaertable', 'ordaertable'[Cod.Cliente]))
Anonymous
Not applicable

You are the boss @themistoklis Thanks you so much 🙂

Stachu
Community Champion
Community Champion

try this

CALCULATE ( COUNT ( 'ordaertable'[NOE] ), ALL ( 'ordertable'[NOE] ) )

CALCULATE changes filter contex of calculation to the one I highlighted , which ignores filters coming from visuals etc. 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

themistoklis
Community Champion
Community Champion

@Anonymous

 

Try the following:

 

Measure = CALCULATE ( COUNT('ordaertable'[NOE]),ALL('ordaertable' ) )

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.