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

Hide row in visualization but include in grand total

I have a table of regions and net sales. There is a row that has a blank value for a region, but still has net sales. I would like to hide this row from view, but still include all the data in that row in the grand total. Is this possible?

I've tried using a page-level or visualizaton-level filter, but while the row dissappears it also removes the data from the grand total. 

 

Thank you in advance.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

To create a measure as below.

 

Grand Total = IF(MAX('net sales'[Region]) = BLANK(),BLANK(),CALCULATE(SUM('net sales'[net sales])))

Capture.PNG

 

Also please find the pbix attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous

 

You can do this. You can filter the blank region ( For ex: In visual filter)

 

Create this measure.

 

Grand Total = IF(COUNTROWS('Grand Total')<>COUNTROWS(ALLSELECTED('Grand Total')),
SUM('Grand Total'[Sales]),
CALCULATE(SUM('Grand Total'[Sales]),ALL('Grand Total')))
 
Grand Total.PNG
Thanks
Raj
Anonymous
Not applicable

Hi Raj,


Thanks for the reply, I have some follow up questions.

 

If my table's name is Net Sales, and the name of the column being summed is also Net Sales, 

Grand Total = IF(COUNTROWS('Net Sales')<>COUNTROWS(ALLSELECTED('Net Sales')),
SUM('Net Sales'[Net Sales]),
CALCULATE(SUM('Net Sales'[Net Sales]),ALL('Net Sales')))
Would this be correct?

Also, how would this measure be implemented into the matrix? I have created the measure but it is not being used.

Thank you.

Hi @Anonymous ,

 

To create a measure as below.

 

Grand Total = IF(MAX('net sales'[Region]) = BLANK(),BLANK(),CALCULATE(SUM('net sales'[net sales])))

Capture.PNG

 

Also please find the pbix attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

it causes performance issue in direct query mode. Is there any way this can be optimized. Also with this any other measure you bring in matrix needs to be manipulated like above.

I applised physical filter and used CALCULATE(Expression, ALL(Ignore Filter column) and it worked. but again lot of performance issue with direct query mode.

Hi @Anonymous ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.