<?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: Multi-Column Aggregations (MC Aggregations) in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/861623#M401</link>
    <description>&lt;P&gt;Can this max formula be used with dates?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have dates in multiple columns, some are blank or missing, but need the max date per row across multiple columns.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2019 05:23:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-02T05:23:09Z</dc:date>
    <item>
      <title>Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/391698#M129</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"I like big aggregations and I cannot lie&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You other PBI'ers can't deny"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The attached PBIX file contains a slew of aggregations that span multiple columns All standard quick aggregations are included, namely:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Max&lt;/LI&gt;
&lt;LI&gt;Min&lt;/LI&gt;
&lt;LI&gt;Sum&lt;/LI&gt;
&lt;LI&gt;Average&lt;/LI&gt;
&lt;LI&gt;Count&lt;/LI&gt;
&lt;LI&gt;Count (Distinct)&lt;/LI&gt;
&lt;LI&gt;Variance&lt;/LI&gt;
&lt;LI&gt;Standard Deviation&lt;/LI&gt;
&lt;LI&gt;Median&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This techinque can be employed with as many columns as required although I use 4 in the examples. Below is the "MC Max" measure for reference. The rest are a variation on this theme:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;MC Max = 
VAR tmpCol1 = SELECTCOLUMNS(Data,"Column",[Value1])
VAR tmpCol2 = SELECTCOLUMNS(Data,"Column",[Value2])
VAR tmpCol3 = SELECTCOLUMNS(Data,"Column",[Value3])
VAR tmpCol4 = SELECTCOLUMNS(Data,"Column",[Value4])
VAR tmpTable = UNION(UNION(UNION(tmpCol1,tmpCol2),tmpCol3),tmpCol4)
VAR tmpValue = MAXX(tmpTable,[Column])
RETURN tmpValue&lt;/PRE&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&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;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiMTYyNTBhMWEtMzliZC00NGZjLWFkNjctN2YwYTIwMDMwMjYzIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 20:44:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/391698#M129</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-06-18T20:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/443400#M161</link>
      <description>&lt;P&gt;Points for creativity!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 15:26:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/443400#M161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-19T15:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/757819#M368</link>
      <description>&lt;P&gt;This is beautiful&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 12:46:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/757819#M368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-05T12:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/861623#M401</link>
      <description>&lt;P&gt;Can this max formula be used with dates?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have dates in multiple columns, some are blank or missing, but need the max date per row across multiple columns.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 05:23:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/861623#M401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-02T05:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/862258#M402</link>
      <description>&lt;P&gt;Yep, shouldn't be any problem.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 13:32:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/862258#M402</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-12-02T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2252446#M801</link>
      <description>&lt;P&gt;como podria omitir los ceros al calcular el promedio&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 16:58:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2252446#M801</guid>
      <dc:creator>dmalque</dc:creator>
      <dc:date>2021-12-22T16:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2300063#M810</link>
      <description>&lt;P&gt;hola&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;estoy iniciando y probe esto, pero en el resultado de las columnas me lanza el mismo valor pra todos y no es el verdadero promedio y el valor maximo de cada Fila, me puedes ayudar?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&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;</description>
      <pubDate>Tue, 25 Jan 2022 05:45:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2300063#M810</guid>
      <dc:creator>EtnaEstrella</dc:creator>
      <dc:date>2022-01-25T05:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2300094#M811</link>
      <description>&lt;P&gt;lo resolví, cuando usas el codigo en aumentar columna sale el mismo valor, pero cuado añades una medida en el informe los valores ya salen correcto&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 05:58:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2300094#M811</guid>
      <dc:creator>EtnaEstrella</dc:creator>
      <dc:date>2022-01-25T05:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2919066#M921</link>
      <description>&lt;P&gt;Hello, Thank you &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;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="354190" data-lia-user-login="EtnaEstrella" class="lia-mention lia-mention-user"&gt;EtnaEstrella&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="342353" data-lia-user-login="dmalque" class="lia-mention lia-mention-user"&gt;dmalque&lt;/a&gt;&amp;nbsp;for this multicolumn aggregations. Can I know how to get the column name of where this aggregation came from ?&amp;nbsp; I am using this to finding a limiting material that is low in supply. I found the minimum value with the formula and I need to get the name of that column. Can anyone help ? Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 14:53:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2919066#M921</guid>
      <dc:creator>gsksarepta</dc:creator>
      <dc:date>2022-11-21T14:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-Column Aggregations (MC Aggregations)</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2919653#M924</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="427517" data-lia-user-login="gsksarepta" class="lia-mention lia-mention-user"&gt;gsksarepta&lt;/a&gt;&amp;nbsp;Well, you could check for the existance of that value in the temp tables like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MC Min = 
VAR tmpCol1 = SELECTCOLUMNS(Data,"Column",[Value1])
VAR tmpCol2 = SELECTCOLUMNS(Data,"Column",[Value2])
VAR tmpCol3 = SELECTCOLUMNS(Data,"Column",[Value3])
VAR tmpCol4 = SELECTCOLUMNS(Data,"Column",[Value4])
VAR tmpTable = UNION(UNION(UNION(tmpCol1,tmpCol2),tmpCol3),tmpCol4)
VAR tmpValue = MINX(tmpTable,[Column])
VAR __Result = 
  SWITCH(TRUE(),
    tmpValue IN __tmpCol1, "Value1",
    tmpValue IN __tmpCol2, "Value2",
    tmpValue IN __tmpCol3, "Value3",
    "Value4"
  )
RETURN __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 19:40:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/2919653#M924</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-11-21T19:40:33Z</dc:date>
    </item>
  </channel>
</rss>

