<?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: OR function in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/OR-function/m-p/2029924#M45496</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Well, here is the code cleaned up:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Yield %_latest_total =
IF (
    ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "AP3" )
        || ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "AF1" ),
    CALCULATE (
        SUM ( Fact_Yield_Detail_Latest[Good_Qty] ),
        Fact_Yield_Detail_Latest[Process_Description] = "Double Check"
    )
        / CALCULATE (
            SUM ( Fact_Yield_Detail_Latest[Start_Qty] ),
            Fact_Yield_Detail_Latest[Process_Description] = "Lathe Cutting"
        ),
    IF (
        Fact_Yield_Detail_Latest[Item_Group_deduce] = "SP2 (toric)"
            || ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "SP2 (non-toric)" ),
        CALCULATE (
            SUM ( Fact_Yield_Detail_Latest[Good_Qty] ),
            Fact_Yield_Detail_Latest[Process_Description] = "Double Check"
        )
            / CALCULATE (
                SUM ( Fact_Yield_Detail_Latest[Start_Qty] ),
                Fact_Yield_Detail_Latest[Process_Description] = "UV mould prep"
            ),
        0
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;What I would suggest is to return hard coded values for each possible condition. Then you can check your logic.&lt;/P&gt;</description>
    <pubDate>Sat, 21 Aug 2021 18:37:06 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2021-08-21T18:37:06Z</dc:date>
    <item>
      <title>OR function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/OR-function/m-p/2029915#M45493</link>
      <description>&lt;P&gt;This post has closed.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 16:47:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/OR-function/m-p/2029915#M45493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-26T16:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: OR function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/OR-function/m-p/2029924#M45496</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Well, here is the code cleaned up:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Yield %_latest_total =
IF (
    ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "AP3" )
        || ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "AF1" ),
    CALCULATE (
        SUM ( Fact_Yield_Detail_Latest[Good_Qty] ),
        Fact_Yield_Detail_Latest[Process_Description] = "Double Check"
    )
        / CALCULATE (
            SUM ( Fact_Yield_Detail_Latest[Start_Qty] ),
            Fact_Yield_Detail_Latest[Process_Description] = "Lathe Cutting"
        ),
    IF (
        Fact_Yield_Detail_Latest[Item_Group_deduce] = "SP2 (toric)"
            || ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "SP2 (non-toric)" ),
        CALCULATE (
            SUM ( Fact_Yield_Detail_Latest[Good_Qty] ),
            Fact_Yield_Detail_Latest[Process_Description] = "Double Check"
        )
            / CALCULATE (
                SUM ( Fact_Yield_Detail_Latest[Start_Qty] ),
                Fact_Yield_Detail_Latest[Process_Description] = "UV mould prep"
            ),
        0
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;What I would suggest is to return hard coded values for each possible condition. Then you can check your logic.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Aug 2021 18:37:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/OR-function/m-p/2029924#M45496</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-08-21T18:37:06Z</dc:date>
    </item>
  </channel>
</rss>

