Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I have a table, where the need the total of the Region column but need to exclude "Grand total" value from that sum. So just sum of anything before Grand Total.
Solved! Go to Solution.
Hi @mohiniverma2704
Good Day !
First go to create the rank desc order based on Index column after that you should remoe the rank 1 . rank 1 will apper in last row .
Try this calculation for your requitrements
Measure =Var _AA=
Hi @mohiniverma2704 ,
Thanks to @Thennarasu_R and @netanel for their quick replies. Please allow me to offer an alternative idea:
(1) This is my test data.
(2) We can create a measure.
MEASURE =
IF (
ISFILTERED ( 'Table'[Region] ),
SUM ( 'Table'[Value] ),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALLSELECTED ( 'Table' ), [Region] <> "Grand total" )
)
)
Or if you are limited to excluding the last row, then we need to click on "transform data" to go to the power query and add an index column.
Then we can create a measure.
Measure 2 =
var _max_row=MAXX(ALL('Table'),[Index])
RETURN IF(ISFILTERED('Table'[Region]),SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),[Index] <> _max_row)))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mohiniverma2704 ,
Thanks to @Thennarasu_R and @netanel for their quick replies. Please allow me to offer an alternative idea:
(1) This is my test data.
(2) We can create a measure.
MEASURE =
IF (
ISFILTERED ( 'Table'[Region] ),
SUM ( 'Table'[Value] ),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALLSELECTED ( 'Table' ), [Region] <> "Grand total" )
)
)
Or if you are limited to excluding the last row, then we need to click on "transform data" to go to the power query and add an index column.
Then we can create a measure.
Measure 2 =
var _max_row=MAXX(ALL('Table'),[Index])
RETURN IF(ISFILTERED('Table'[Region]),SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),[Index] <> _max_row)))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mohiniverma2704
Good Day !
First go to create the rank desc order based on Index column after that you should remoe the rank 1 . rank 1 will apper in last row .
Try this calculation for your requitrements
Measure =Var _AA=
Hi @mohiniverma2704
This one should work
Sum_Without_Grand_Total =
IF(
ISINSCOPE('Yure_Table'[SomeColumn]),
SUM('Yure_Table'[Amount]),
BLANK()
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
77 | |
76 | |
57 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
56 | |
46 | |
40 |