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
Pikachu-Power
Post Prodigy
Post Prodigy

Matrix with Top 10 but Total all

Hi all,

 

I have a matrix filtered with top 10. but as a total I want the whole number not filtered with top 10. is it possible to handle it in one matrix?

 

thanks. 

1 ACCEPTED SOLUTION

Hi @Pikachu-Power 

Let's assume we have a table

Column1 Column2 Value
A d 1
B d 1
C d 3
X d 2
Y d 2
B d 2
A e 4
B e 5
C e 6
X e 7
Y e 8

 

That table could be presented as your Matrix

Unbenannt.png

To achieve your goal create a measure

Measure = IF(
HASONEVALUE('Table'[Column1]),
CALCULATE(SUM('Table'[Value])),
CALCULATE(SUM('Table'[Value]),ALL('Table'[Column1]))
)

and place it as Value into your matrix as follow:

Снимок.PNG

 

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

use isfiltered or hasonevalue and change the formula https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

 

Or instead of filter use if like (Not tested for measure like rank)

Sumx(Table,if([Rank]<=10,[Measure],0)

I am not sure if we talk about the same values. I have a matrix like this:

 

Unbenannt.png

Filtered with Top 3 for example. Instead of 6 I want the whole sum. For example 10 for existing A,B,C,X,Y.

Hi @Pikachu-Power 

Let's assume we have a table

Column1 Column2 Value
A d 1
B d 1
C d 3
X d 2
Y d 2
B d 2
A e 4
B e 5
C e 6
X e 7
Y e 8

 

That table could be presented as your Matrix

Unbenannt.png

To achieve your goal create a measure

Measure = IF(
HASONEVALUE('Table'[Column1]),
CALCULATE(SUM('Table'[Value])),
CALCULATE(SUM('Table'[Value]),ALL('Table'[Column1]))
)

and place it as Value into your matrix as follow:

Снимок.PNG

 

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Greg_Deckler
Super User
Super User

Yes, use HASONEVALUE or ISINSCOPE and then you can identify the total row and in that case, SUMX(ALL('Table'),[Column])


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.