<?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: Calculated column to mark database with 1 and 0 based on a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962543#M11312</link>
    <description>&lt;P&gt;Yes, that's the BD table. To see the measure working I usually see the total of 7th shifts worked month by month, or the quantity of people who did more than 7 shifts on a week v/s the ones that worked less than 6, so I basically use the same Date hierarchy and also I filtered the workers with the X Function, so there are no more columns/tables involved. I tried the formula, but it didn't worked, it displays a repeated number, not the 1s and 0s as I need and it also doesn't take account of the X Function in its calculation,&lt;BR /&gt;&lt;BR /&gt;Greetings!&lt;/P&gt;</description>
    <pubDate>Fri, 06 Mar 2020 16:28:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-06T16:28:44Z</dc:date>
    <item>
      <title>Calculated column to mark database with 1 and 0 based on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962446#M11296</link>
      <description>&lt;P&gt;Hi everyone! I need help with a calculated column that marks with 1 when a person with a certain kind of Function worked 7 shifts on a week. I found a way to calculate this with a measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;M7HT = 
COUNTROWS(
    FILTER(
        SUMMARIZE(BD,BD[Week],BD[WorkerID]
        ,"Count7",COUNT(BD[WorkerID]))
        ,[Count7]=7
            )
)&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;With this measure everythings works great, and I can cover the Function problem by filtering my reports with let's say Function ="X"&lt;BR /&gt;So the thing is, I need to pass this to a calculated column because I need to visualize the date when the person with the X Function worked the 7th shift, I need to visualize how many times on a month the person worked a 7th shift, I need to know the average of 7th shifts that all workers with the "X" Function did on a certain period, etc. And the measure doesn't solve all that. Could you please help me? I can't figure it out and I really need it. I think this has to do with iterators? If you can also help me with some content about that subject to learn more it would be great,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your time,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gabriela&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 15:32:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962446#M11296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-06T15:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column to mark database with 1 and 0 based on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962466#M11299</link>
      <description>&lt;P&gt;Need some more information, what table are you creating this in? Sample data would be great. Please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 15:42:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962466#M11299</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-06T15:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column to mark database with 1 and 0 based on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962487#M11302</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;sorry I forgot to give more context, right now I can't share you the data, but the table looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;WorkerID&lt;/TD&gt;&lt;TD&gt;Function&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Shift&lt;/TD&gt;&lt;TD&gt;Week&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;01-01-2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;02-01-2020&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;01-01-2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;01-01-2020&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically you have a row for everytime the worker worked on a certain date doing a certain function. There are three shifts every day, so the person can work more than two times a day, I don't know if that information is relevant, but that's pretty much the whole picture, I hope the scenario is clearer,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 15:58:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962487#M11302</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-06T15:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column to mark database with 1 and 0 based on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962497#M11304</link>
      <description>&lt;P&gt;OK, so is that your BD table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is the case, you might need to do something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;M7HT Column = 
  VAR __WorkerID = [WorkerID]
RETURN
  CALCULATE([M7HT],FILTER(ALL('BD'),[WorkerID]=__WorkerID))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When this measure "works", how are you displaying it? What other columns/tables are in the visualization with the measure?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 16:06:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962497#M11304</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-06T16:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column to mark database with 1 and 0 based on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962543#M11312</link>
      <description>&lt;P&gt;Yes, that's the BD table. To see the measure working I usually see the total of 7th shifts worked month by month, or the quantity of people who did more than 7 shifts on a week v/s the ones that worked less than 6, so I basically use the same Date hierarchy and also I filtered the workers with the X Function, so there are no more columns/tables involved. I tried the formula, but it didn't worked, it displays a repeated number, not the 1s and 0s as I need and it also doesn't take account of the X Function in its calculation,&lt;BR /&gt;&lt;BR /&gt;Greetings!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 16:28:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-to-mark-database-with-1-and-0-based-on-a/m-p/962543#M11312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-06T16:28:44Z</dc:date>
    </item>
  </channel>
</rss>

