SSAS Tabular Calculated Column: Want a calc column that only populates if row value = X

I have a table with SalesAgentID, SalesAgentTypeID (can be types 1,2, or 3), and I want to add a new column called Type1, Type2, Type3.
Type 1 would only show the SalesAgentID if SalesAgentTypeID =1.
It seems like I should be able to do this with a calculated column but I'm not having any luck, I tried using a FILTER but couldn't get that to work and now I tried a LOOKUPVALUE but get "calculation error in column, a table of multiple values was supplied
where a single value was expected".
=LOOKUPVALUE[SalesAgentID,[SalesAgentTypeID],1)
Second part of this, I want to use this to build a hierarchy as AgentType 1 should be the top, Type2 below 1, etc...
Perhaps there is a better way to build a hierarchy than making these calculated columns?  (Since we have a hard set limit of 4 levels it just seemed easier to treat this like Country, State, City, etc...)

Hi OneWithQuestions,
According to your description, you want to create a calculated column in your tabular model. And the value in the calculated column is based on the SalesAgentType column, right?
In this case, you can use the DAX below to create the calculated column.
IF(TableName[SalesAgentType]=1,value,blank())
I have tested it on my localenvironment, the screenshot below is for you reference.
Reference
http://msdn.microsoft.com/en-in/library/hh213003.aspx
http://msdn.microsoft.com/en-us/library/gg492126.aspx
Regards,
Charlie Liao
If you have any feedback on our support, please click
here
Charlie Liao
TechNet Community Support

Similar Messages

  • I want the max date but only look at rows with a certain category value.

    I want a way to get the max date but only look at rows with a certain category value - ignoring the other rows.  My detail table contains expenditures including date (col A) and category (col D) the number of rows will increase with expenditures over time.  My summary table will have a cell for each category and display the last expense date for that category using a functionality that I must ask of you, dear community.
    I am using the latest numbers on an iPad (4) with IOS6.
    Secondarily, I would like to add another cell in the summery table with the value (col E) of the last expense for each category.
    Thank you,
    Warren

    ...later...
    With the addition of an auxiliary column to the Main table, a second header row to the Most recent table, and a minor modification to the formula on the second table, the tables can handle a range of dates set by entering the first and last date into A1 abd B1 respectively of the summary table, Most recent.
    Note that the selected range, shown with a green background in the auxiliary column, does not contain any category B expenses. Using LOOKUP, this would result in a repeat of the January 6 expense bering listed in this row. Switching to VLOOKUP, which can be set to require an exact match, allows the result shown—if there are no expenses in a given category, the formula returns "none" (or whatever message you substitute for "none" in the formula in that column).
    Formulas:
    Main::A2: =IF(OR(B<Most recent :: $A$1,B>Most recent :: $B$1),"x"&E,E)
    Fill down to the end of column A.
    This column must be located on the left side of the table (ie. must be column A), but may be hidden.
    Most recent::A2: =IFERROR(VLOOKUP($D,Main :: $A:$D,COLUMN()+1,FALSE),"none")
    "FALSE" will display as "Exact match" in Numbers's formula editor.
    Fill down to the end of the table and right to column C.
    Regards,
    Barry

  • SSAS Tabular - Adding Column to a table gives error "Object reference not set to instance of object"

    If I make changes to a table in SSAS Tabular Visual Studio, the newly added column gives error as "Object
    reference not set to instance of object"

    Hi VikasJain13,
    According to your description, you get the "Object reference not set to instance of object" error when adding columns in Tabular. Right?
    Generally, it throws this error when the internal code is accessing the property of an empty object. As you mentioned it happens when you make changes on a table, mostly it means that table is already a empty object. Please re-process your tabular to see
    if this table is still existing. 
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Can I have a browser report in SSAS cube that is Tabular. [I Dnt want the different columns to be in relation with each other, no grouping wanted]

    Hi,
    Can anyone here help me with a query I have in SSAS regarding a Designing on Report. 
    Basically what my team desires is a Report, which is already been made from OLPT DB. The nature of report is not of a Cube. 
    They need a Simple tabular report. Which means we want to display columns just like in SELECT Statement in sql. 
    When I drag my dimension on the report (row or column grouping). No data is fetched. 
    Simply can anyone tell me if Simple tabular report is possible in SSAS or not. 

    Hi Senthiaan,
    Yes you can use "Microsoft.AnalysisServices.AdomdClient.dll" in your
    .NET application to execute MDX queries and populate Datasets. Take a look into the following code;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace ConsoleApplication2
    using Microsoft.AnalysisServices.AdomdClient;
    class Program
    static void Main(string[] args)
    System.String Query = "SELECT {[Measures].[Sales Amount]} ON COLUMNS, NON EMPTY{[Date].[Calendar Year].[Calendar Year].MEMBERS} ON ROWS FROM [Adventure Works]";
    AdomdConnection oConnection = new AdomdConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorksDW;Data Source=localhost");
    AdomdDataAdapter oAdapter = new AdomdDataAdapter(Query, oConnection);
    System.Data.DataTable objDT = new System.Data.DataTable("Results");
    oAdapter.Fill(objDT);
    foreach (System.Data.DataRow r in objDT.Rows)
    System.Console.WriteLine(r[0].ToString() + " :- " + r[1].ToString());
    objDT.Dispose();
    oAdapter.Dispose();
    oConnection.Dispose();
    System.Console.ReadLine();
    ADOMD Client DLL locates in the following location.
    C:\Program Files\Microsoft.NET\ADOMD.NET\110\Microsoft.AnalysisServices.AdomdClient.dll
    Best regards.
    (Mark and Vote if the Answer helps...)

  • Related column of a fact table - SSAS Tabular

    Hi,
    I'm developing a SSAS Tabular model using a SQL Server 2012 SP 1 installation.
    For a fact table I've created some calculated columns using the DAX RELATED function. These columns not are hidden to client tools. When I deploy the project and I open an Excel workbook in order to connect the SSAS Tabular cube, in the field list I cannot
    see the calculated columns by RELATED function.
    For me, this in an issue and not a normal behaviour.
    Any suggests to me, please? Many thanks

    Hi Pscorca,
    Generally, if we create a calculated column on SQL Server tabular model database on SSMS, and then go to Model-> Process -> Process All and finish the data processing. Then when we connect the database in EXCEL, the calculated column will appear on
    the Excel. In your scenario, you cannot see the calculated columns. It’s strange behavior. However we cannot give you the detail reason for this issue base on the limited information.  Please refer to the link below which describe the detail steps about
    create a calculated column, then check whether if you missing any step when creating calculated column.
    Add Calculated Column and Measures to Tabular Model
    If the issue persists, please elaborate your production environment and the steps to create the calculated column, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Hide/show a column for some users in SSAS tabular

    Hi,
    I have a requirement to show one of the columns in a table only to some of the users. I know SSAS tabular only supports row level security. The only solution I came up with yet is to create two different models. Unfortunately this wastes a lot
    of expensive RAM in the server. Is there a better way? Some kind of work-around? ;)
    Best Regards
    Ulf

    One other way is to embed the security level into the table. You can do this by adding a "security_ID" into your structure and join it with a security table and join this to a security table which has a junction of Tablecolumns/User or TableColumns/UserGroups. 
    The next step is to use a Case When in your sql query  and make a decision to show null or real data for any column. 
    Business Intelligence Architect

  • Reading column data type in SSAS tabular database using adomd

    I am working on SSAS tabular database and I need to find out the column datatype. I am using ADOMD for this. So far I looked at AdomdDataReader.GetSchemaTable
    Method & looked at the below code snippet to retrive Metadata from the AdomdDataReader.
    foreach (DataRow objRow in schemaTable.Rows)
    foreach (DataColumn objColumn in schemaTable.Columns)
    Console.WriteLine(objColumn.ColumnName + " = " + objRow[objColumn]);
    Console.WriteLine();
    I wonder with only the list of columns available to me, how can I execute a query/command and utilize adomd reader to get this information?
    What is the best approach to read column metadata?

    Hi, One option that you can try is to use AMO. Here is a sample code that connects to multi-dimensional model.
    http://sqlblogcasts.com/blogs/drjohn/archive/2012/03/15/ssas-utility-to-check-you-have-the-correct-data-types-and-sizes-in-your-cube-definition.aspx
    You will have to change few things to make it work for tabular model. Sorry, I did not try myself but I hope this will give you some ideas.
    // get DSV - this code assumes only one DSV in cube definition
    AMO.DataSourceView
    dsv = olapDatabase.DataSourceViews[0];
    foreach (AMO.Dimension
    dim in olapDatabase.Dimensions)
     foreach (AMO.DimensionAttribute
    attr in dim.Attributes)
     foreach (AMO.DataItem
    dItem in attr.KeyColumns)
         AddAttributeDataItem(dtCubeDataTypes,
    "Key", dsv, attr, dItem);
    AMO.DataItem contains column size and data type when connected to a tabular database.

  • Tabular Form: Conditional column based on another column in table/form?

    Hi!
    I have 4 columns in table A:
    number (the question number)
    question (the question to be asked)
    type (TEXT, LOV are the 2 valid values)
    answer (the answer with text or a selection from the lov table below)
    I have 2 columns in table B:
    number (the question number)
    values (a single value for the lov's)
    In table B there can be mutiple rows for each number. Table A and table B
    join on the number.
    I want to build a tablular form on table A where for each row either a text
    box or a select list is displayed depending on the contents of the type column.
    So row 1 would display a text box when the type value is text; row 2 would
    display a select list when the type value is lov.
    Is this even possible? How do I refer to the type column in the conditional for the
    answer column? I am guessing that I will need to have 2 answer columns one
    that displays when the type column is TEXT and one that displays when the
    type column contains LOV. This is OK. Setting up the conditional is display is the issue at this point.
    Hopefully I have explained this well enough! :)
    Thanks!
    Dave Venus

    Hi Dave,
    Sorry for not responding sooner - I finish work at 3pm GMT.
    I'll take your first question first (3:28PM posting according to my display - not sure if you are on GMT time?):
    As far as I understand it, using the select_list_from_query() function generates the options that are required in the select list as HTML tags. Each instance of this function should create a SELECT tag and the results of the query should generate one or more OPTION tags within it.
    Second question (4:20PM posting):
    The HTMLDB_ITEM functions are listed in the documentation - here's a link to the online version:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14303/api.htm#sthref2524
    Most of the examples that I have seen have been on this forum - simply search for HTMLDB_ITEM or one of its functions.
    I tend to leave the generation of tabular forms to the wizard as much as possible. The only exceptions are when I need to have access to more than the Primary Key for a row but don't want to show the field on screen. There are examples on the forum about concatenating the HTMLDB_ITEM functions into a single value - this hides ID fields from the user but makes them available to PL/SQL code.
    Third question (5:29PM posting)
    I did try using DECODE in my questionnaire but not for the feature that you needed. Originally, I wanted to use this to display one of a number of different fields (ie, my date, number or string field as appropriate to the question) but this didn't help as I couldn't get back to the right field during the update. If you have decode working for the select lists, then that's great!
    The first column should be hidden or sitting behind a checkbox as this should be the Primary Key for the row and should not be editable by the user nor would it normally be displayed.
    As long as your select statement creates the correct output (albeit that you may need to work on the layout!), you should have an updatable form. However, you will need to have the MRU processes in place and the appropriate buttons that trigger these. When I did my questionnaire, I created the form using a wizard to get all of the processes and buttons and then changed the select statement. If you haven't got the processes and/or buttons, we can go through adding these onto your page.
    Last question (9:08PM posting)
    As explained above, column 1 should normally be hidden. The INPUT tag you detail above is what I would expect to see. The value="6" attribute indicates that 6 is the Primary Key for that row - every row will have the same tag but different values for the "value" attribute. So, if it is hidden and these are the tags you see doing a View Source on the page, then everything is correct.
    OK. So now we have the data on screen and (hopefully?) we have the correct processes and buttons on the page.
    The next step would be validation and update of the data.
    Validation of the data can be handled by a normal page process - I can let you have example code if you want to validate the data (this will also explain how to loop through the rows - there are also methods that you can use to do this in javascript if you want). Updates should be handled by the processes and buttons on the page - again, if you haven't got these we can go through adding them in (although, if you haven't yet formatted your page, you may find it quicker to copy your select statement and create the page again using the same select statement).
    ORA-20001 errors are user defined errors. Do you mean the "data has changed" errors? If so, you will probably need to include the MD5 checksum functionality (it's shown in the document linked above).
    Finally, we'll keep this thread going so that you have all of your workings and my responses in one place, if that's ok with you?
    Regards
    Andy

  • Calculating distinct counts of dimension columns

    Hi, OBIEE Gurus.  Here's today's question on the quiz show "Can this be done?".
    Month
    Region
    Sales
    # Months
    # Regions
    Jan-2013
    East
    1000
    2
    3
    Jan-2013
    Central
    2000
    2
    3
    Jan-2013
    West
    3500
    2
    3
    Feb-2013
    East
    1250
    2
    3
    Feb-2013
    Central
    1925
    2
    3
    Feb-2013
    West
    3450
    2
    3
    The # Months and # Regions columns are the goal today.  There are two months in this analysis (Jan-2013, Feb-2013), out of a total population of 96 months.  There are three regions in this analysis (East, Central, West) out of a total population of 7 regions.  I want those values (2 and 3, respectively) reflected in the # Months and # Regions columns.
    I've tried various combinations of the usual suspects (count, count distinct, sum(count..., sum(count distinct... and so forth) but I haven't found the correct magic spell yet.  Any ideas?

    I found one potential (but somewhat flawed) solution for # Months:
    count(distinct aggregate("Facts"."Sales" at "Geographies"."Geography"."Total Locales"))
    Region is part of my Geography hierarchy, whose highest level is Total Locales.  This says to calculate sales for each row for the Total Locales level, so essentially ignore the Region column.  The flaw here is that two different months that just happen to have exactly the same sales will only generate one distinct value of sales, so there is the potential to undercount.  (I can get around it with a minor calculation, but that's just another complication.)
    It also seems rather clunky, because it has to be modified to accommodate any newly added columns and (basically) create a level-based fact for the highest level of every hierarchy represented except for the column of interest.  So it's not very pretty solution.
    If you have anything more elegant, bring it on.

  • SharePoint Calc Column - How to Find and Replace ANY & ALL Values with Something Else

    Haven't found a solution on this even though it seems like it should be cut and dry.
    I have a column containing characters "-" (e.g., XXX123-123-fjhrh-sdafsdfsd). I want to find every "-" and replace it with "@". Seems easy but so far haven't found a solution. My calc column always seems to stop at the first
    occurence of "-" and only replace that one. Seems every forumula wants you to tell SharePoint where to start (position). You can't simply tell SharePoint, Find this "-" ALL OCCURENCES and replace with this "@" ALL OCCURENCES.
    I don't have the option of saying start at this position because my data is not the same in every cell/field (e.g., number of characters).
    Closest I've gotten is this:
    =REPLACE([IN THIS COLUMN],FIND("-",[IN THIS COLUMN]),LEN("-","@")
    RESULTS:
    XXX@123-XXX-123

    Hi JJSHAREP,
    The formula only works when there are only three "-" in the column value, and the formula will fail if there are more than or less than three "-" in the column value.
    I recommend to use Jquery code to replace the characters in the column called IN THIS COLUMN in the UI:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    var Index=0;
    $(".ms-listviewtable tr th").each(function(i){
    if($(this).find("div").attr("name")=="IN_x0020_THIS_x0020_COLUMN"){
    Index=i;
    $(".ms-listviewtable tr").each(function(i){
    if(i>0){
    var value=$(this).find("td").eq(Index).text();
    var value1=value.replace(/\-/g, '@');
    $(this).find("td").eq(titleIndex).text(value1);
    </script>
    Best regards.
    Thanks
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Passing Session Values to the Tabular Form Element of a Report Column

    Hello,
    I'm running application express version 2.0 with a 10.2.0.2.0 database on a 32 bit windows box. I'm trying to figure out sneaky a way to pass the &APP_PAGE_ID., #APP_PAGE_ID# or V('APP_PAGE_ID'); as an element attribute of a Report Tabular Form Element set to display as a Select List (named LOV).
    It seems that whatever option I choose, the Element Attributes field will only render the literal value of what I have entered. This is part of the solution but I would like to find a way to pass the current page id.
    What I'm trying to do is utilize the ONCHANGE attribute to redirect to a report page in my application when the value from a Select List (named LOV) is selected.
    I could work around this by creating my own table output with PL/SQL and HTP.P commands but would really be interested in finding out if I can use the reporting structures which are already available through Application Express.
    Any ideas?
    Thanks.
    Justin.

    Thanks for the response Earl. To clarify this is what I've done and what I hope to achieve:
    I currently have a LOV for my application that identifies a number of database report types: DB Options, DB Parameters, DB Version, and so on.
    I have an application express report being generated for the databases I'm monitoring and it displays as follows:
    - HOST -- DBTYPE -------- DBNAME - DBREPORTS
    =====================================
    - SVR 1 - Oracle 9.2.0.1 - DEV -------- [LOV HERE]
    - SVR 2 - Oracle 9.2.0.7 - TST --------- [LOV HERE]
    I am displaying the LOV on my report the the options under the reports attribute tab in my application builder. I insert my LOV select list by editing the DBREPORTS column and set the "Display As:" option under Tabular Form Element to "Select List (named LOV)"; I have also added my LOV to the "Named LOV" option under List of Values.
    So far this achieves everything I would expect and works quite well (a select list with my report types appears in my monitor report for each DB that is returned).
    What I'm interested in doing now is opening a DBREPORT for a given database by simply choosing the report type from my LOV. I can set the "Element Attributes" option under Tabular Form Element to execute a javascript call for any valid event (in my case I'm using ONCHANGE).
    My only issue is that I cannot find a way to pass any session values from my page to my Element Attribute. If, in the Element Attributes field I enter:
    onchange="alert(this.value);" //my dialogue box will display the value of my current selection when I choose a report type.
    What I'd love to be able to do is something like:
    onchange="alert('&APP_PAGE_ID.');" //so my current page id is written to the element.
    Unfortunately, only my literal text seems to be rendered. Rather than having my dialogue come back with my page number, say 75, I receive the literal value &APP_PAGE_ID.
    Notwithstanding any quote issues, I've tried to dump a test html attribute to my source html by entering any of the following in the Element Attributes field:
    test=&APP_PAGE_ID.
    test=#APP_PAGE_ID#
    and as a shot in the dark knowing that I'm not using PL/SQL:
    test=V('APP_PAGE_ID');
    In every case when I view source I see the literal value of what was entered in the Element Attributes field (ie "test=&APP_PAGE_ID." instead of "test=75").
    What makes things a little more frustrating is that I can drop &APP_PAGE_ID. into the Column Heading field (ex My Heading &APP_PAGE_ID.), it renders as I would expect; "My Heading 75". If we could find a solution to this, I could see a number of slick uses for this type of functionality.
    Hope this helps,
    Thanks.
    Justin.

  • Tabular Report for Update a single column

    Hello Everyone,
    I have a tabular report which will display 1 column (apart from primary key),
    1. I will display a edit icon (on primary key)
    2. when the user selects this icon, this only row must become updatable (only one column must become text item, so that user can modify the value).
    3. Next this text item, i would like to display save button and cancel button so that user can click one of these buttons next to that particular row.
    Any help would be appreciated.
    Regards
    Anil

    There is no easy way to do this without some incredibly lengthy javascript. Tabular forms still do not give much declarative control to the developer.
    If you are looking to click a button and update one column on one row, it's easiest to change your design to two pages using report and form. Make the first page the report with an Edit button, click the button (nothing more than a link) and it goes to a basic form with only one updateable field. After submit, branch back to the first page. Easy.
    For the end user, there are no more mouse clicks involved in this than what you described originally so it's likely it'll be an acceptable application design change.

  • SharePoint 2013 Make Calculated Column based on Custom Column

    In SharePoint 2013, I am trying to create a Calculated Column that is a shortened display of another Custom Column. The Calculated Column would just show the first 100 characters concatenated with "..." like in the following formula:
    =LEFT([CustomColumn],100)&"..."
    However, every time that I go to create this calculated column, SharePoint doesn't provide my [CustomColumn] in the "Insert Column:" list. If I type it in anyway, SharePoint throws an error.
    Details on my Column, List, and Site below:
        Col. Type: Multiple lines of text
        Col. Group: Custom Columns
        Col. Text Type: Enhanced rich text
        List Content Type: Custom Type Inherits from Event
        Site Type: Publishing
    Also, to no avail, I found this similar post (link below), but creating the Site Column and Calculated Column
    before adding it to the Content Type did not work for me. 
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/26a7517e-ba43-4c49-95aa-3e6f7f4207ba/calculated-field-in-content-type-not-working
    Anyone out there know how to coax SharePoint into submission?!

    Multi lines of text are one of the types of columns which can't be used by calculated columns/fields. Among such unusable columns are also Lookup columns, People columns, External Columns, MMS columns, etc.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • From  date column I want to pick the hours only......

    Dear All
    I am facing the following problem.
    I having following date format in database of date column
    4/7/2006 10:26 AM
    4/7/2006 07:18 PM
    from this date column I want to pick the hours only , For ex. 10, 07 resp.from the above record.
    I tried it to solve using SUBSTR and LTRIM-TRIM function, but this functions will truncate the time format and so unable to pick the Hours.
    Is there any other solution for this.
    Also the date column I have is in 12 Hours(AM/PM) format I want to convert it into 24 Hours . Like 07 PM . I want it to 19.
    Thanks
    Vishal.

    TEST@db102 SQL> select * from test;
    C1
    4/7/2006 10:26 AM
    4/7/2006 07:18 PM
    TEST@db102 SQL> select to_char(to_date(c1,'dd/mm/yyyy hh:mi PM'),'hh24') from test;
    TO
    10
    19
    TEST@db102 SQL>                                               

  • I want to return a number from a column, if the adjacent column contains either "nurse" or Receptionist"

    I have a table with dates which i have converted to a number using the Month Fx.  This number is then in a seperate column, which inus e for charts.  I am trying to return this number only if the adjacent column contains either "nurse" or "receptionist". ie I dont want them all....

    Kang,
    Yes.  Happy Easter!  was cloudy yesterday in Austin, Texas.
    I do not know where the formula you posted in your previous post came from.  It is certainly not correct.  What confuses me about the bottom table is I do not know how it connects to the top table.
    Are the groups of people "Clinical Staff", "PDR", "Fire Training"  (bottom table column A) groupings of the staff types listed in in the top table, column C?
    If so then it may be worth adding some columns to define how the roles map to the training groups.
    At this point it must be defined and assumed.  Which row are you wanting to fill out for "Nurse" and "Nurse Practitioner"?
    A little exaplaination:
    the countif() function contains two arguments like this:
    =countif(range, test)
    the range is a group of cells (often, but not always, a column).  The test must be an expression that evaluates to true or false.
    so if the column is set to column C of the top table then the range would be expressed as (assuming the table name is "Table 1"):
    "Table 1::$G"
    to test whether the role is a "Nurse" the test (or condition) would be:
    "Nurse"
    putting these together you would get a countif() function like this which would return the number of Nurses (not really what you want but getting close):
    =countif(Table 1::$G, "Nurse")
    you actually want to count when:
    A) the month is a particular month and
    B) the role is a "Nurse"
    you also want to count when:
    C) the month is a particular month and
    D) the role is a "Secialist Nurse Practitioner"
    so you can use the countifs() function.
    the countifs() function counts the occurances where only ALL conditions are met.
    you would use the counifs() twice and add the results together like this:
    =COUNTIFS(test-values1,condition1, test-values2,condition2)
    you can add as many test values and conditions as you like (you must add in pairs)
    To do this you should add an extra row in the header of the bottom table to hold the month number.  Jan is 1, Feb is 2, etc.
    Here is what I think you want:
    The top table corresponds to the bottom table in your post.  notice I added an extra row (to contain the month number):
    B3=COUNTIFS(Table 4::$C, "Nurse", Table 4::$G, B$1) + COUNTIFS(Table 4::$C, "Specialist Nurse Practitioner", Table 4::$G, B$1)
    this is shorthand for select cell B3, then type (or copy and paste from here) the formula:
    =COUNTIFS(Table 4::$C, "Nurse", Table 4::$G, B$1) + COUNTIFS(Table 4::$C, "Specialist Nurse Practitioner", Table 4::$G, B$1)
    no select B3 and fill to the right by hovering the cursor over the right edge of the, now select, cell B3 and dragging the little yellow circle to the right.

Maybe you are looking for