<?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 Switch where cell contains json data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050335#M14344</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I wonder if anyone has an elegant solution to the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that contains a column of JSON data indicating which months a customer has thier peak business months.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want users to be able to filter customers who's Peak Business Month contains any specific month/months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When imported and before treating the column as JSON the data looks like this,&amp;nbsp;&lt;SPAN&gt;where there can be upto 12 values.&lt;/SPAN&gt;&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;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Peak Buiness Months&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;X&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;{"0":348,"1":349,"2":354}&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;{"0":354}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the cell in question suggests the customer has peak bsuiness months of Jan, Feb and Jul&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End Result Required (for the example above)&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;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Business Peaks&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Jan Feb Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My instinct is to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;treat as JSON, then expand the column so that I get 12 columns,&lt;/LI&gt;&lt;LI&gt;then to merge the data so I end up with a column that looks like this (where there are 3 peak business months)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The column could contain between 0 and 12 values for each row of data.&lt;/SPAN&gt;&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;&lt;SPAN&gt;Peak Months&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;352 353 358&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. From there I'm thinking of a custom column using Switch to provide a column&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Business Peaks=switch(348, "Jan",349,"Feb",350,"Mar",351,"Apr",352,"May",353,"Jun",354,"Jul",355,"Aug",356,"Sept",357,"Oct",358,"Nov",359,"Dec")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My problem is that the Switch function only works effectively where a Merged cell at step 2 has only one value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only way I can think of dealing with this is to switch the values on each of the 12 columns of expanded JSON data before the merge. Then to hide everything but the final merged column from the end user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution Required&lt;/STRONG&gt;&lt;BR /&gt;Is there a variant on Swith that would pick up multiple values from the switch statemtment?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a more elegant alternative?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can help.....&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 09:21:41 GMT</pubDate>
    <dc:creator>antonyf</dc:creator>
    <dc:date>2020-04-27T09:21:41Z</dc:date>
    <item>
      <title>Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050335#M14344</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I wonder if anyone has an elegant solution to the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that contains a column of JSON data indicating which months a customer has thier peak business months.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want users to be able to filter customers who's Peak Business Month contains any specific month/months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When imported and before treating the column as JSON the data looks like this,&amp;nbsp;&lt;SPAN&gt;where there can be upto 12 values.&lt;/SPAN&gt;&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;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Peak Buiness Months&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;X&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;{"0":348,"1":349,"2":354}&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;{"0":354}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the cell in question suggests the customer has peak bsuiness months of Jan, Feb and Jul&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End Result Required (for the example above)&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;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Business Peaks&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Jan Feb Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My instinct is to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;treat as JSON, then expand the column so that I get 12 columns,&lt;/LI&gt;&lt;LI&gt;then to merge the data so I end up with a column that looks like this (where there are 3 peak business months)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The column could contain between 0 and 12 values for each row of data.&lt;/SPAN&gt;&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;&lt;SPAN&gt;Peak Months&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;352 353 358&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. From there I'm thinking of a custom column using Switch to provide a column&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Business Peaks=switch(348, "Jan",349,"Feb",350,"Mar",351,"Apr",352,"May",353,"Jun",354,"Jul",355,"Aug",356,"Sept",357,"Oct",358,"Nov",359,"Dec")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My problem is that the Switch function only works effectively where a Merged cell at step 2 has only one value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only way I can think of dealing with this is to switch the values on each of the 12 columns of expanded JSON data before the merge. Then to hide everything but the final merged column from the end user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution Required&lt;/STRONG&gt;&lt;BR /&gt;Is there a variant on Swith that would pick up multiple values from the switch statemtment?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a more elegant alternative?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can help.....&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 09:21:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050335#M14344</guid>
      <dc:creator>antonyf</dc:creator>
      <dc:date>2020-04-27T09:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050387#M14347</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203951" data-lia-user-login="antonyf" class="lia-mention lia-mention-user"&gt;antonyf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see the attached file with Power Query steps to transform JSON into a tabular format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" target="_blank"&gt; LinkedIn &lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 09:27:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050387#M14347</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2020-04-27T09:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050449#M14350</link>
      <description>&lt;P&gt;After merging the data you want to replace the values inside the M Query. You can do that one by one, or by writing a custom function. A good step by step solution is here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=MLrRlPh_ZFQ" target="_blank"&gt;https://www.youtube.com/watch?v=MLrRlPh_ZFQ&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 09:42:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050449#M14350</guid>
      <dc:creator>zaza</dc:creator>
      <dc:date>2020-04-27T09:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050556#M14359</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81408" data-lia-user-login="Mariusz" class="lia-mention lia-mention-user"&gt;Mariusz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see where you are heading with that and it works on certain levels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I dont' think it will allow me to display a single cell containing all the peak business months for a given customer that sits in the original table carrying columns for many other customer attributes.&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;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Town&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Business Peaks&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Attribute X&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Attribute Y&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Highton&lt;/TD&gt;&lt;TD&gt;Jan Feb Jul&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Lowton&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Midton&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:31:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050556#M14359</guid>
      <dc:creator>antonyf</dc:creator>
      <dc:date>2020-04-27T10:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050582#M14361</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203951" data-lia-user-login="antonyf" class="lia-mention lia-mention-user"&gt;antonyf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry but I'm struggling to understand what you need, can you provide a sample for both tables and explain how they relate and explain what outcome you are expecting based on this sample?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" target="_blank"&gt; LinkedIn &lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:45:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050582#M14361</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2020-04-27T10:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050628#M14363</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81408" data-lia-user-login="Mariusz" class="lia-mention lia-mention-user"&gt;Mariusz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whilst your proposed solution does provide me with an entension&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose what I intially want to do is extract the Month IDs from the JSON array column and replace then with the Month Name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Starting Point&lt;/STRONG&gt;&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;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Account Type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Town&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Peak Buiness Months&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;X&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Key&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Upton&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;{"0":348,"1":349,"2":354}&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Basic&lt;/TD&gt;&lt;TD&gt;Downton&lt;/TD&gt;&lt;TD&gt;{"0":354}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD&gt;Basic&lt;/TD&gt;&lt;TD&gt;Midton&lt;/TD&gt;&lt;TD&gt;{"0":355,"1":356}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End Point&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Account Type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Town&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Peak Business Months&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Key&lt;/TD&gt;&lt;TD&gt;Upton&lt;/TD&gt;&lt;TD&gt;Jan Feb Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Basic&lt;/TD&gt;&lt;TD&gt;Downton&lt;/TD&gt;&lt;TD&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD&gt;Basic&lt;/TD&gt;&lt;TD&gt;Midton&lt;/TD&gt;&lt;TD&gt;Aug Sept&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From there a &lt;EM&gt;contains &lt;/EM&gt;filter can be applied to column 'Peak Business Months'&lt;/SPAN&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:50:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050628#M14363</guid>
      <dc:creator>antonyf</dc:creator>
      <dc:date>2020-04-27T11:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050704#M14366</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203951" data-lia-user-login="antonyf" class="lia-mention lia-mention-user"&gt;antonyf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see the attached file with a solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" target="_blank"&gt; LinkedIn &lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:51:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050704#M14366</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2020-04-27T11:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050941#M14378</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81408" data-lia-user-login="Mariusz" class="lia-mention lia-mention-user"&gt;Mariusz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Temptingly close... but your solution does not reflect values in the corresponding JSON arrary correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It simply looks to be counting the number of responses in the JSON arrary, then simply inserting the same number of month names starting at Jan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To resolve this...&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I adapat the line in your file (see below) &lt;SPAN&gt;to look up the correct month name for thevalues in the JSON array?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;EM&gt;each Text.Start( Date.MonthName( #date( 1, Number.FromText( _ ) + 1, 1 ) ), 3&lt;/EM&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets assume I carry these values in a table titled &lt;STRONG&gt;Peak Months&lt;/STRONG&gt;&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;ID&lt;/TD&gt;&lt;TD&gt;Month Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;348&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;349&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;350&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;351&lt;/TD&gt;&lt;TD&gt;April&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;352&lt;/TD&gt;&lt;TD&gt;May&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;353&lt;/TD&gt;&lt;TD&gt;Jun&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;etc&lt;/TD&gt;&lt;TD&gt;etc.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 13:12:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1050941#M14378</guid>
      <dc:creator>antonyf</dc:creator>
      <dc:date>2020-04-27T13:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051217#M14386</link>
      <description>&lt;P&gt;Paste into the advanced editor and that's it.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WilDSUfJOrQSSoQUl+XlAujpGySBGycrYxEInRskQzLIEsoxALFOTWqVYnWilSKA6p8TizGQg7ZJfnoeqE6YqCkmVb2YKmiJTmPGmZkDlsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Customer = _t, #"Account Type" = _t, Town = _t, #"Peak Buiness Months" = _t]),
    #"Parsed JSON" = Table.TransformColumns(Source,{{"Peak Buiness Months", Json.Document}}),
    #"Expanded Peak Buiness Months" = Table.ExpandRecordColumn(#"Parsed JSON", "Peak Buiness Months", {"0", "1", "2"}, {"0", "1", "2"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Expanded Peak Buiness Months", {"Customer", "Account Type", "Town"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"Value", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "MonthNumber", each [Value] - 348 + 1),
    #"Removed Columns1" = Table.RemoveColumns(#"Added Custom",{"Value"}),
    #"Added Custom1" = Table.AddColumn(#"Removed Columns1", "Peak Month", each Date.ToText( #date(2020, [MonthNumber], 1), "MMM" )),
    #"Removed Columns2" = Table.RemoveColumns(#"Added Custom1",{"MonthNumber"}),
    #"Grouped Rows" = Table.Group(#"Removed Columns2", {"Customer", "Account Type", "Town"}, {{"Peak Months", each (_)[Peak Month], type table [Peak Month=text]}}),
    #"Added Custom2" = Table.AddColumn(#"Grouped Rows", "Peak Month", each Text.Combine( [Peak Months], " " )),
    #"Removed Columns3" = Table.RemoveColumns(#"Added Custom2",{"Peak Months"}),
    #"Renamed Columns" = Table.RenameColumns(#"Removed Columns3",{{"Peak Month", "Peak Months"}})
in
    #"Renamed Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 14:48:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051217#M14386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T14:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051456#M14398</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="203951" data-lia-user-login="antonyf" class="lia-mention lia-mention-user"&gt;antonyf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've adjusted the file to accommodate an extra table&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" target="_blank"&gt; LinkedIn &lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 16:02:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051456#M14398</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2020-04-27T16:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051533#M14403</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81408" data-lia-user-login="Mariusz" class="lia-mention lia-mention-user"&gt;Mariusz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for this. An elegant solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note to future users: This variation on the solution requires an addtional table in the model, whilst&amp;nbsp;Anonymous&lt;/a&gt;'s solution which also works involves addtional manipulations, but does not require the second table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well done both.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 16:46:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051533#M14403</guid>
      <dc:creator>antonyf</dc:creator>
      <dc:date>2020-04-27T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Switch where cell contains json data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051536#M14404</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. A second solution to this particulr problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nicely steped through in the PBIX file too. Appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 16:48:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-where-cell-contains-json-data/m-p/1051536#M14404</guid>
      <dc:creator>antonyf</dc:creator>
      <dc:date>2020-04-27T16:48:10Z</dc:date>
    </item>
  </channel>
</rss>

