Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Grand Total when using IsInScope?

I have the below measure:

 

 

VAR VParent =
FILTER (
SUMMARIZE ( Revenue, 'Customer'[Parent], 'Cost'[Business] ),
[Measure1] > 0
)

VAR MaxParent = MAXX ( VParent, [Measure1] )

VAR SubT = CALCULATE ( [Measure1], VParent )

VAR VLead =
FILTER (
SUMMARIZE ( Revenue, 'Leads'[No], 'Cost'[Business] ),
[Measure1] > 0
)

VAR Max_Leads = MAXX ( VLead, [Measure1] )

VAR SubTotal_Leads = CALCULATE ( [Measure1], VLead )

RETURN
SWITCH (
TRUE (),
ISINSCOPE ( 'Customer'[Customer] ), DIVIDE ( SubT, MaxParent ),
ISINSCOPE ( 'Customer'[Parent] ), DIVIDE ( SubT, MaxParent ),
ISINSCOPE ( 'Leads'[Emp] ), DIVIDE ( SubTotal_Leads, Max_Leads ),
BLANK ()
)

 

 

If I select "table" visualization in Power BI, grand total appears BLANK()…

 

The measure as it is works fine, but I wanted to add a grand total whenever I display it in a table.

 

I am not sure if it is possible to display a grand total (as an average) of what is displayed. I aim to display a GrandTotal, of whatever is displayed... That is; if 'Customer'[Customer] is in scope, I aim to display the grand total for that.

1 REPLY 1
lbendlin
Super User
Super User

There are a couple of DAX functions for that , like ROLLUPADDISSUBTOTAL function (DAX) - DAX | Microsoft Docs

 

but you will need to rewrite your measure first to use SUMMARIZECOLUMNS

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.