Showing results for 
Search instead for 
Did you mean: 
New Member

DAX to conditionally exclude rows from table grand total



Is anybody able to assist with the below?


I have a measure that does not calculate the percentage if TWOX and GT are the same number (showing N/A instead).


But this is not working for the grand total at the bottom - so the % for site group A is now 93% rather than 90%. Ideally I would like the keep the grand total for TWOX and GT with (280 and 300) with the correct % (90%)


Site_Group           Site                   TWOX                    GT         %

A                           1                        94                         100              94%

A                           2                        86                         100              86%

A                           3                       100                        100              N/A

Total                                              280                        300               93%



Regular Visitor

Hi @00Jess00,
can you please tell me what measure you wrote?
And try TRUNC function For TWOX.
I look forward to you reply

Sure, it is:

% = IF(TWOX=GT, "N/A", (TWOX/GT))


Thank you!

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors