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
Fapo
Frequent Visitor

Show measure total ignoring columns in matrix

Hello community, I have a question.

 

I have a matrix constructed in the following way:

 

Value x: product stock

Columns: months

Rows: product description

 

This is fine. It shows the value for each month by product. At the end, it shows the column totals.

 

Now I want to add a second value (a measure), call it "value y", but:

I want only the column totals to be shown. I do not want to see the value for each month.

 

So it should be:

 

                Month 1 Month 2 Month 3 Total x  Total y

Product 1 Value x   Value x   Value x    Sum x     Sum y

Product 2 Value x   Value x   Value x    Sum x     Sum y

Product 3 Value x   Value x   Value x    Sum x     Sum y

 

And not:

 

                Month 1 Month 1 Month 2 Month 2 Month 3 Month 3 Total x  Total y

Product 1 Value x   Value y     Value x   Value y     Value x    Value y     Sum x     Sum y

Product 2 Value x   Value y     Value x   Value y     Value x    Value y     Sum x     Sum y

Product 3 Value x   Value y     Value x   Value y     Value x    Value y     Sum x     Sum y

 

So, is there a way to tell dax to ignore the month column filter?

Prima facie I actually don´t think there is one, but I want to be shure.

 

Cheers, and thank you very much in advance.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

If you come up with a better way, let me know but what I had to do was write the measure so that if it was in a total row, it returned the value but otherwise returned BLANK(). But then I had to turn off word wrap and shrink all of the columns for that measure value. Ugly but works.


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

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

If you come up with a better way, let me know but what I had to do was write the measure so that if it was in a total row, it returned the value but otherwise returned BLANK(). But then I had to turn off word wrap and shrink all of the columns for that measure value. Ugly but works.


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

@Greg_Deckler 

How did you write the measure that checks if it is in a total row? Perhaps an ugly solution indeed, but if this trick works, it solves quite some problems 🙂

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.