How to Ignore Specific Text In a DAX function so the result will not be calculated for those cells in a column showing a specific text?

SioSho

New Member
Joined
Feb 8, 2022
Messages
7
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi All you excellent excel wizards again!

A bit of a new one here, that's had me hung up for a few days!
So I now hove my % Profit/Loss figure, we split our work into departments...

I have the actual recovery calculating correctly the sum for this is :

=(Sum('Xero Income'[Credit])-Sum('Harvest Expenses'[Amount])-Sum(Harvest[Time Cost]))/MAX(Sum('Xero Income'[Credit]),SUM('Harvest Expenses'[Amount])+SUM(Harvest[Time Cost]))+1

But due to the +1 to get the correct recovery, it adds 100% to clients that are in the payroll department and do not have anything to do with bookkeeping, bypassing my department filter and gives everything that's blank in the expense and income tables (as they're filtered by department! in the pivot) the 100% result bypassing the filter... the blank rows are due to the expenses and income being in a different department "payroll" i want this 100% to go away pretty much! so i don't get all these blank rows due to it being the wrong department.
1645155077951.png


I need it to only calculate IF the department = "Bookkeeping" for example, My pivot is linked to a department via: (all tables software expenses / Time expenses / income are connected by this link )
1645155156298.png


Any help would be appreciated, because its causing issues such as all these blank cells:
1645155205260.png

Many many Advanced thanks!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top