<?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: Multiple Date Calculations in Slicer from Row data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4119400#M163550</link>
    <description>&lt;P&gt;Here is a DAX version of&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="785426" data-lia-user-login="ahadkarimi" class="lia-mention lia-mention-user"&gt;ahadkarimi&lt;/a&gt; 's answer. (The power query version is way easier for larger datasets.)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;categoryTable = 
var _t1 = 
SELECTCOLUMNS(
    surveyTable,
    "_survey", [Survey],
    "_category", "cat1",
    "_value", DATEDIFF([Date1], [Date2], DAY)
)
var _t2 = 
SELECTCOLUMNS(
    surveyTable,
    "_survey", [Survey],
    "_category2", "cat2",
    "_value", DATEDIFF([Date1], [Date3], DAY)
)
var _t3 = 
SELECTCOLUMNS(
    surveyTable,
    "_survey", [Survey],
    "_category3", "cat3",
    "_value", DATEDIFF([Date2], [Date4], DAY)
)
Return
UNION(_t1, _t2, _t3)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2024 20:51:38 GMT</pubDate>
    <dc:creator>jgeddes</dc:creator>
    <dc:date>2024-08-26T20:51:38Z</dc:date>
    <item>
      <title>Multiple Date Calculations in Slicer from Row data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4119364#M163541</link>
      <description>&lt;P&gt;I have a dataset that has multiple different date calculations on the same row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date1,2,3,etc.&amp;nbsp; There are 12 separate date differential calculations between about 6-8 different date columns on the same row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to calculate all of those separate calculations then wrap into a slicer?&amp;nbsp; I tried unpivoting but this will only display the actual date and not the calculation.&amp;nbsp; I have it running properly another way but everything is on separate tabs.&amp;nbsp; I included an example of what I am trying to do as I am probably not detailing it very well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 20:22:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4119364#M163541</guid>
      <dc:creator>common763</dc:creator>
      <dc:date>2024-08-26T20:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Date Calculations in Slicer from Row data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4119390#M163547</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="214200" data-lia-user-login="common763" class="lia-mention lia-mention-user"&gt;common763&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create Calculated Columns&lt;/STRONG&gt; for each date difference (e.g., Date1 - Date2, Date1 - Date3, etc.).&lt;BR /&gt;&lt;STRONG&gt;Unpivot the Calculated Columns&lt;/STRONG&gt; in Power Query to create a long format table.&lt;BR /&gt;Use the &lt;STRONG&gt;unpivoted column names&lt;/STRONG&gt; as your slicer/filter.&lt;BR /&gt;So you can select different date calculations in a slicer.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P align="center"&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Did I answer your question?&amp;nbsp;&lt;/STRONG&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;If so, please mark my post as the solution!&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Your Kudos are much appreciated!&amp;nbsp;&lt;/STRONG&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Proud to be a Responsive Resident!&lt;/STRONG&gt;&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 20:38:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4119390#M163547</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-26T20:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Date Calculations in Slicer from Row data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4119400#M163550</link>
      <description>&lt;P&gt;Here is a DAX version of&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="785426" data-lia-user-login="ahadkarimi" class="lia-mention lia-mention-user"&gt;ahadkarimi&lt;/a&gt; 's answer. (The power query version is way easier for larger datasets.)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;categoryTable = 
var _t1 = 
SELECTCOLUMNS(
    surveyTable,
    "_survey", [Survey],
    "_category", "cat1",
    "_value", DATEDIFF([Date1], [Date2], DAY)
)
var _t2 = 
SELECTCOLUMNS(
    surveyTable,
    "_survey", [Survey],
    "_category2", "cat2",
    "_value", DATEDIFF([Date1], [Date3], DAY)
)
var _t3 = 
SELECTCOLUMNS(
    surveyTable,
    "_survey", [Survey],
    "_category3", "cat3",
    "_value", DATEDIFF([Date2], [Date4], DAY)
)
Return
UNION(_t1, _t2, _t3)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 20:51:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4119400#M163550</guid>
      <dc:creator>jgeddes</dc:creator>
      <dc:date>2024-08-26T20:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Date Calculations in Slicer from Row data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4120745#M163599</link>
      <description>&lt;P&gt;I want to try the first solution because that will clean up some of the calculations.&amp;nbsp; Will get back today with response.&amp;nbsp; Thanks for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 12:40:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Date-Calculations-in-Slicer-from-Row-data/m-p/4120745#M163599</guid>
      <dc:creator>common763</dc:creator>
      <dc:date>2024-08-27T12:40:36Z</dc:date>
    </item>
  </channel>
</rss>

