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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,215,402
Messages
6,124,708
Members
449,182
Latest member
mrlanc20

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