<?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: I start month with 5 columns but in the end of the month one column does not exist in the rowset. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-start-month-with-5-columns-but-in-the-end-of-the-month-one/m-p/2504330#M69303</link>
    <description>&lt;P&gt;Try unpivoting the columns&amp;nbsp;&lt;SPAN&gt;PASSED, FAILED, INCONCLUSIVE, NOT APPLICABLE, NOT CHECKED in Power Query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Using&amp;nbsp;= Table.UnpivotOtherColumns, should the&amp;nbsp;NOT CHECKED column go missing, it won't cause a query error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We'll call the number of audits for each "Value" and the field value (PASSED, FAILED,...) "Status" for now.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now,&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RESULT =
IF (
    CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] &amp;lt;&amp;gt; "NOT CHECKED")
             )= 0,
    "NOT AUDITED",
    IF (
        CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "FAILED")
             ) &amp;gt; 0,
        "FAILED",
        IF (
            CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "INCONCLUSIVE")
             ) &amp;gt; 0,
            "INCONCLUSIVE",
            IF ( CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "NOT CHECKED")
             ) &amp;gt; 0, "IN PROGRESS", "PASSED" )
        )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;Because "Not checked" is just another possible value of [Status], nothing would occour if it's missing.&lt;/P&gt;</description>
    <pubDate>Tue, 10 May 2022 09:32:08 GMT</pubDate>
    <dc:creator>rbriga</dc:creator>
    <dc:date>2022-05-10T09:32:08Z</dc:date>
    <item>
      <title>I start month with 5 columns but in the end of the month one column does not exist in the rowset.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-start-month-with-5-columns-but-in-the-end-of-the-month-one/m-p/2503851#M69287</link>
      <description>&lt;P&gt;I have a PBI report which data source is MS Lists.&lt;/P&gt;&lt;P&gt;It is about auditing some criterias.&lt;/P&gt;&lt;P&gt;In the beggining of the month I have 5 columns ( PASSED, FAILED, INCONCLUSIVE, NOT APPLICABLE, NOT CHECKED).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in the end of the month the column NOT CHECKED no longer exists as all audits have been checked.&lt;/P&gt;&lt;P&gt;Because of that I get a refresh error in PBI Service:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Data source error: The '&amp;lt;pii&amp;gt;NOT CHECKED&amp;lt;/pii&amp;gt;' column does not exist in the rowset. Table: AuditsAll.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I avoid this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is my DAX formula:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RESULT =
IF (
    AuditsAll[PASSED] + AuditsAll[FAILED] + AuditsAll[INCONCLUSIVE] + AuditsAll[NOT APPLICABLE] = 0,
    "NOT AUDITED",
    IF (
        AuditsAll[FAILED] &amp;gt; 0,
        "FAILED",
        IF (
            AuditsAll[INCONCLUSIVE] &amp;gt; 0,
            "INCONCLUSIVE",
            IF ( AuditsAll[NOT CHECKED] &amp;gt; 0, "IN PROGRESS", "PASSED" )
        )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 07:32:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-start-month-with-5-columns-but-in-the-end-of-the-month-one/m-p/2503851#M69287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-10T07:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: I start month with 5 columns but in the end of the month one column does not exist in the rowset.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-start-month-with-5-columns-but-in-the-end-of-the-month-one/m-p/2504330#M69303</link>
      <description>&lt;P&gt;Try unpivoting the columns&amp;nbsp;&lt;SPAN&gt;PASSED, FAILED, INCONCLUSIVE, NOT APPLICABLE, NOT CHECKED in Power Query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Using&amp;nbsp;= Table.UnpivotOtherColumns, should the&amp;nbsp;NOT CHECKED column go missing, it won't cause a query error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We'll call the number of audits for each "Value" and the field value (PASSED, FAILED,...) "Status" for now.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now,&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RESULT =
IF (
    CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] &amp;lt;&amp;gt; "NOT CHECKED")
             )= 0,
    "NOT AUDITED",
    IF (
        CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "FAILED")
             ) &amp;gt; 0,
        "FAILED",
        IF (
            CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "INCONCLUSIVE")
             ) &amp;gt; 0,
            "INCONCLUSIVE",
            IF ( CALCULATE(
            SUM(AuditsAll[Value]),
             KEEPFILTERS(AuditsAll[Status] = "NOT CHECKED")
             ) &amp;gt; 0, "IN PROGRESS", "PASSED" )
        )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;Because "Not checked" is just another possible value of [Status], nothing would occour if it's missing.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 09:32:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-start-month-with-5-columns-but-in-the-end-of-the-month-one/m-p/2504330#M69303</guid>
      <dc:creator>rbriga</dc:creator>
      <dc:date>2022-05-10T09:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: I start month with 5 columns but in the end of the month one column does not exist in the rowset.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-start-month-with-5-columns-but-in-the-end-of-the-month-one/m-p/2513007#M69753</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm not very clear how your data source operates. When the NOT CHECKED column has no value, could you add a space " " or "null"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 09:19:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-start-month-with-5-columns-but-in-the-end-of-the-month-one/m-p/2513007#M69753</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-05-13T09:19:45Z</dc:date>
    </item>
  </channel>
</rss>

