<?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: Create a Conditional Table that creates a newly summarized table that enforces filters. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Conditional-Table-that-creates-a-newly-summarized-table/m-p/2605450#M75418</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="404644" data-lia-user-login="Kyle21" class="lia-mention lia-mention-user"&gt;Kyle21&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Go to Power query and copy the Table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Select 5 columns in Table2 -- Unpivot columns.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. In the table formed by Unpivot columns, select [Value] – Remove.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;4. Select [Attribute] – Remove Duplicates.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;5. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Code =
SWITCH(
    TRUE(),
    'Table2'[Attribute]="Type","TY001",
    'Table2'[Attribute]="Name","NA001",
    'Table2'[Attribute]="Status","ST001",
    'Table2'[Attribute]="isVIP","VIP001",
    'Table2'[Attribute]="Account No","AN001")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Description =
SWITCH(
    TRUE(),
    'Table2'[Attribute]="Type","Type is Required",
    'Table2'[Attribute]="Name","Name is Required",
    'Table2'[Attribute]="Status","Status is Required",
    'Table2'[Attribute]="isVIP","A value is Required",
    'Table2'[Attribute]="Account No","Account Number is Required")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Exceptions =
SWITCH(
    TRUE(),
    'Table2'[Attribute]="Type",0,
    'Table2'[Attribute]="Name",0,
    'Table2'[Attribute]="Status",1,
    'Table2'[Attribute]="isVIP",0,
    'Table2'[Attribute]="Account No",1)&lt;/LI-CODE&gt;
&lt;P&gt;6. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2022 02:37:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-28T02:37:23Z</dc:date>
    <item>
      <title>Create a Conditional Table that creates a newly summarized table that enforces filters.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Conditional-Table-that-creates-a-newly-summarized-table/m-p/2597104#M74980</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set which I need to do some validation reporting on and so far have created calculated columns which test all rows in the data set for a Status , Acc No, and isVIP value, otherwise the value of 1 is returned in order to allow for counting all exceptions raised for each field per validation control.&lt;/P&gt;&lt;P&gt;Here is an example of what the source data will look like:&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;The rules that I have that each account has to abide by are:&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;I have managed to write a SAS script which can check each of these rows and to write either a 0 to represent a pass or 1 for an exception raised and show the total exceptions per validation rule. The output table required for reporting has to be in the following format:&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;Is it possible at all to produce the same result using either Power Query or DAX (or both :D) to produce this kind of table that can be used for visualizations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance regarding what approach would be of much help! Hopefully others can learn something from this too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Kyle&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>Thu, 23 Jun 2022 09:02:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Conditional-Table-that-creates-a-newly-summarized-table/m-p/2597104#M74980</guid>
      <dc:creator>Kyle21</dc:creator>
      <dc:date>2022-06-23T09:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Conditional Table that creates a newly summarized table that enforces filters.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Conditional-Table-that-creates-a-newly-summarized-table/m-p/2601856#M75222</link>
      <description>&lt;P&gt;Hi Kyle21,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you explain, with more details,&amp;nbsp; how you calculate&amp;nbsp; the value in the column Exception?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jun 2022 21:25:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Conditional-Table-that-creates-a-newly-summarized-table/m-p/2601856#M75222</guid>
      <dc:creator>ManguilibeKAO</dc:creator>
      <dc:date>2022-06-25T21:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Conditional Table that creates a newly summarized table that enforces filters.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Conditional-Table-that-creates-a-newly-summarized-table/m-p/2605450#M75418</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="404644" data-lia-user-login="Kyle21" class="lia-mention lia-mention-user"&gt;Kyle21&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Go to Power query and copy the Table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Select 5 columns in Table2 -- Unpivot columns.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. In the table formed by Unpivot columns, select [Value] – Remove.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;4. Select [Attribute] – Remove Duplicates.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;5. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Code =
SWITCH(
    TRUE(),
    'Table2'[Attribute]="Type","TY001",
    'Table2'[Attribute]="Name","NA001",
    'Table2'[Attribute]="Status","ST001",
    'Table2'[Attribute]="isVIP","VIP001",
    'Table2'[Attribute]="Account No","AN001")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Description =
SWITCH(
    TRUE(),
    'Table2'[Attribute]="Type","Type is Required",
    'Table2'[Attribute]="Name","Name is Required",
    'Table2'[Attribute]="Status","Status is Required",
    'Table2'[Attribute]="isVIP","A value is Required",
    'Table2'[Attribute]="Account No","Account Number is Required")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Exceptions =
SWITCH(
    TRUE(),
    'Table2'[Attribute]="Type",0,
    'Table2'[Attribute]="Name",0,
    'Table2'[Attribute]="Status",1,
    'Table2'[Attribute]="isVIP",0,
    'Table2'[Attribute]="Account No",1)&lt;/LI-CODE&gt;
&lt;P&gt;6. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 02:37:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Conditional-Table-that-creates-a-newly-summarized-table/m-p/2605450#M75418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-28T02:37:23Z</dc:date>
    </item>
  </channel>
</rss>

