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
PowerUser123
Helper II
Helper II

Matrix - Show Calculation only as a Total

I have a matrix where I'm showing months of the year as columns.

 

I need a measure to only show up in the Total rather than for every single column. 

 

I know the workaround of ISBLANK, but that isn't a very optimal solution.

 

Are there any other workaround for this issue that have been developed?

 

If not, the issue I have with the ISBLANK method is that I need the title of my measure which can be long to appear in the total section. But if the title of my measure shows up in the total section, it also shows up in the columns. I know how I can change the color of the font, but the width required for the name of my measure requires me to manually drag the column to a minimum width. This is fine as a one-time thing, but it is not. Every new month that appears when data is refreshed makes my measure column that should only appear as a total show up with a really long width that I have to go and manually make smaller. So this isn't a really a deployable solution if I have to go in and make this change all the time.

 

Any better ideas or solutions or is this still where we're at?

2 REPLIES 2
Greg_Deckler
Super User
Super User

@PowerUser123 Try:

Measure =
  VAR __Count = COUNTROWS('Table')
  VAR __CountAll = COUNTROWS(ALLSELECTED('Table'))
  VAR __Return = IF(__Count = __CountAll, <total value goes here>, BLANK())
RETURN
  __Return

@ 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 

 

Appreciate the reply. So I believe that measure makes the measure blank across each month and appear in the total section correct?

 

I have a solution such as that implemented, but to me it's not optimal and was wondering if there are any other solutions.

 

The reason why it doesn't work for me is that I need to display the measure name in the total section (Vs Prior Month) and can't make it blank to have the column be automatically small across the months.

 

This is what my table would look like:

PowerUser123_0-1668251270864.png

So the measure above would work because it displays blank per month but appears in the total. However, I need to manually drag and make the Vs Prior Month column disappear for each month. I was wondering if there are any solutions that prevents me from having to do that step. As the current solution isn't really deployable as each new month appears, someone has to manually go in and drag the column so it doesn't appear. 

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.