<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Checking for multiple Ids in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4143588#M164685</link>
    <description>&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="426215" data-lia-user-login="gmsamborn" class="lia-mention lia-mention-user"&gt;gmsamborn&lt;/a&gt;&amp;nbsp;for suggestion the below solution - I only needed to change under VAR _NotCommenced the Application Dimension[Status] to IN {Offer, Background Checks, Onboarding}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IsJobArchivable = 
VAR _Job = [JobID]
VAR _Commenced =
    COUNTROWS( 
        FILTER( 
            'FactTable',
            'FactTable'[JobID] = _Job
                &amp;amp;&amp;amp; RELATED( 'Application Dimension'[Status] ) = "Commenced"
        )
    )
VAR _NOTCommenced =
    COUNTROWS( 
        FILTER( 
            'FactTable',
            'FactTable'[JobID] = _Job
                &amp;amp;&amp;amp; RELATED( 'Application Dimension'[Status] ) &amp;lt;&amp;gt; "Commenced"
        )
    )
VAR _Result =
    IF(
        _Commenced &amp;gt; 0
            &amp;amp;&amp;amp; _NOTCommenced = 0,
        TRUE(),
        FALSE()
    )
RETURN
    _Result&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2024 20:51:06 GMT</pubDate>
    <dc:creator>Silvard</dc:creator>
    <dc:date>2024-09-10T20:51:06Z</dc:date>
    <item>
      <title>Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4140622#M164537</link>
      <description>&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;I need to identify completed JobId's, ideally as a calculated column. I have 1 fact table with JobID and ApplicationID and two dim tables, one for JobID and one for ApplicationID.&lt;/P&gt;&lt;P&gt;Each JobID can contain many ApplicationID's.&amp;nbsp;&lt;SPAN&gt;I need a calculated column that checks if a candidate (ApplicationId) has commenced and under that same JobId, check if there are other candidates found suitable who are still going through the stages of offer and onboarding. If there aren't, the job is considered complete. This is Recruitment based.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have tried the below but it doesn't give the correct result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I greatly appreciate your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IsJobArchivable = VAR CurrentJobID = 'Fact Table'[JobID] VAR HasIncompleteNotOffer = CALCULATE( COUNTROWS('Application Dimension'), FILTER( 'Application Dimension', 'Application Dimension'[JobID] = CurrentJobID &amp;amp;&amp;amp; 'Application Dimension'[Application Stage] &amp;lt;&amp;gt; "Offer" &amp;amp;&amp;amp; NOT 'Application Dimension'[Complete Application] ) ) VAR HasComplete = CALCULATE( COUNTROWS('Application Dimension'), FILTER( 'Application Dimension', 'Application Dimension'[JobID] = CurrentJobID &amp;amp;&amp;amp; 'Application Dimension'[Complete Application] ) ) RETURN IF(HasComplete &amp;gt; 0 &amp;amp;&amp;amp; HasIncompleteNotOffer = 0, TRUE(), FALSE())&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:21:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4140622#M164537</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-09-09T12:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4140634#M164539</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can write the calculation as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JobStatus =&lt;BR /&gt;VAR CurrentJobID = FactTable[JobID]&lt;BR /&gt;VAR CandidatesCommenced =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS(FactTable),&lt;BR /&gt;FactTable[JobID] = CurrentJobID,&lt;BR /&gt;RELATED(DimApplication[Status]) = "Commenced"&lt;BR /&gt;)&lt;BR /&gt;VAR CandidatesInOfferOrOnboarding =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS(FactTable),&lt;BR /&gt;FactTable[JobID] = CurrentJobID,&lt;BR /&gt;RELATED(DimApplication[Status]) IN {"Offer", "Onboarding"}&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;CandidatesCommenced &amp;gt; 0 &amp;amp;&amp;amp; CandidatesInOfferOrOnboarding = 0,&lt;BR /&gt;"Completed",&lt;BR /&gt;"Not Completed"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;make sure to update the status based on your's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post helps, then I would appreciate a thumbs up&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;and mark it as the solution&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:31:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4140634#M164539</guid>
      <dc:creator>Selva-Salimi</dc:creator>
      <dc:date>2024-09-09T12:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141429#M164585</link>
      <description>&lt;P&gt;Hi Selva,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks your prompt response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the above but am getting the below error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;&lt;SPAN class=""&gt;True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.&lt;/SPAN&gt;&lt;/H1&gt;&lt;P&gt;How can we rewrite the formula please?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 22:25:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141429#M164585</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-09-09T22:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141460#M164587</link>
      <description>&lt;P&gt;I updated the formula using relatedtable instead, but It's still not producing the expected result.&lt;/P&gt;&lt;P&gt;In fact another formula, much simpler, produces the same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ApplicationisCompleted =&lt;BR /&gt;IF(DimApplication[Status])&amp;lt;&amp;gt;"", Completed)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This column contains the candidates who have finalised their onboarding and otherwise "".&lt;/P&gt;&lt;P&gt;I somehow need a formula that checks this column and where there are "Completes", check the JobID for any other ApplicationID's that are going through the offer and onboarding stages.&lt;/P&gt;&lt;P&gt;This column is what equals the below in your formula.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RELATED(DimApplication[Status]) = "Commenced"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 23:02:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141460#M164587</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-09-09T23:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141516#M164589</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please try below ,&lt;SPAN&gt;please see below pbix file for reference&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1bTAgptmF5RFZQ4jwQdg3CrY77rWcTFTS/view?usp=drive_link" target="_blank"&gt;https://drive.google.com/file/d/1bTAgptmF5RFZQ4jwQdg3CrY77rWcTFTS/view?usp=drive_link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;completed jobs = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;RELATEDTABLE&lt;/SPAN&gt;&lt;SPAN&gt;(application_dim)),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; application_dim[completed]=&lt;/SPAN&gt;&lt;SPAN&gt;"Y"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; application_dim[stage]&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"Offer"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Sep 2024 00:18:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141516#M164589</guid>
      <dc:creator>powerbiexpert22</dc:creator>
      <dc:date>2024-09-10T00:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141873#M164608</link>
      <description>&lt;P&gt;Hi Powerbiexpert!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for helping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately this produces the same result as before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me clarify the problem/scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 tables - JobID Dimension, ApplicationID Dimension and lastly a FactTable that links these together and includes both JobID and ApplicationID, relationships one to many going to FactTable.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;A JobID can contain many ApplicationID's. Think about it this way, a line area requests to recruit, which produces a JobID. Any candidates that apply, produces an ApplicationID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Under the ApplicationDim I have a column that identifies all ApplicationIDs that have completed their onboarding. If an applicationId hasn't reached that stage, the result is "" in this column.&lt;/P&gt;&lt;P&gt;I also have another column, Stages, under this Dim that picks up the stage each application is at (there are about 9 stages candidates go through)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where an ApplicationID is finalised (on boarded) I somehow need this question answered - are there any other ApplicationIDs under that same JobID that are ongoing an offer/onboarding stage.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 03:25:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141873#M164608</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-09-10T03:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141889#M164610</link>
      <description>&lt;P&gt;I have created the below as a visual of the situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scenario I have looks like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JobID. &amp;nbsp; &amp;nbsp; AppID. &amp;nbsp; &amp;nbsp; Stage. &amp;nbsp; &amp;nbsp; Onboarded&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Offer&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Onboarding&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Onboarded &amp;nbsp;Success&lt;/P&gt;&lt;P&gt;2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Backgrounds&lt;/P&gt;&lt;P&gt;2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Offer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In JobID 1, there is one candidate onboarded. How do I pick up that there is at least one more application that were found successful and is at one of those stages?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 03:56:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141889#M164610</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-09-10T03:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141928#M164612</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You already have value "&lt;SPAN&gt;Success&lt;/SPAN&gt;" available in&amp;nbsp;&lt;SPAN&gt;Onboarded column as shown below, use this value to filter rows in your calculation. if possible , please send me the pbix file with sample data (attach in google drive and share the link).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 05:03:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4141928#M164612</guid>
      <dc:creator>powerbiexpert22</dc:creator>
      <dc:date>2024-09-10T05:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for multiple Ids</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4143588#M164685</link>
      <description>&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="426215" data-lia-user-login="gmsamborn" class="lia-mention lia-mention-user"&gt;gmsamborn&lt;/a&gt;&amp;nbsp;for suggestion the below solution - I only needed to change under VAR _NotCommenced the Application Dimension[Status] to IN {Offer, Background Checks, Onboarding}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IsJobArchivable = 
VAR _Job = [JobID]
VAR _Commenced =
    COUNTROWS( 
        FILTER( 
            'FactTable',
            'FactTable'[JobID] = _Job
                &amp;amp;&amp;amp; RELATED( 'Application Dimension'[Status] ) = "Commenced"
        )
    )
VAR _NOTCommenced =
    COUNTROWS( 
        FILTER( 
            'FactTable',
            'FactTable'[JobID] = _Job
                &amp;amp;&amp;amp; RELATED( 'Application Dimension'[Status] ) &amp;lt;&amp;gt; "Commenced"
        )
    )
VAR _Result =
    IF(
        _Commenced &amp;gt; 0
            &amp;amp;&amp;amp; _NOTCommenced = 0,
        TRUE(),
        FALSE()
    )
RETURN
    _Result&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 20:51:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Checking-for-multiple-Ids/m-p/4143588#M164685</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-09-10T20:51:06Z</dc:date>
    </item>
  </channel>
</rss>

