<?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 Ordering years from slicer in dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995226#M100910</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im struggling abit with the following&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got a slicer that collects years from the calender&lt;/P&gt;&lt;P&gt;so atm its showing 2017 - 2018 - 2019 - 2020 -2021 -2022&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;i used&amp;nbsp;&lt;SPAN&gt;CONCATENATEX&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to make a var with all the years in it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then i used&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CONTAINSSTRING to check whatever is clicked and add data to that&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the thing is now that i need some kinda loop and i dont know how to build it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;there is a formula after that , thatgives weight to the years,&amp;nbsp;&lt;SPAN&gt;depending on what is clicked in the slicer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so for example if clicked 2022 2021 2020 2018 --&amp;gt; 2022 = 50% , 2021 = 35% , 2020 = 10% ,&amp;nbsp;&lt;SPAN&gt;2018 = 10%&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it should also do it when you skip a year or more years&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so for example if clicked 2022 2020 2017 --&amp;gt; 2022 = 50% , 2020 = 35 % , 2017 = 15%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so basicly last year in selection allways have the biggest weight 50%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;next one in row from the selected gets 35%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;next one in row from the selected gets 15%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and so on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;anyone abble to help me out here, my brain been explodnig to trying to figure this out and its probably so easy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thx Mike&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2022 18:57:44 GMT</pubDate>
    <dc:creator>Mike_1</dc:creator>
    <dc:date>2022-12-30T18:57:44Z</dc:date>
    <item>
      <title>Ordering years from slicer in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995226#M100910</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im struggling abit with the following&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got a slicer that collects years from the calender&lt;/P&gt;&lt;P&gt;so atm its showing 2017 - 2018 - 2019 - 2020 -2021 -2022&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;i used&amp;nbsp;&lt;SPAN&gt;CONCATENATEX&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to make a var with all the years in it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then i used&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CONTAINSSTRING to check whatever is clicked and add data to that&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the thing is now that i need some kinda loop and i dont know how to build it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;there is a formula after that , thatgives weight to the years,&amp;nbsp;&lt;SPAN&gt;depending on what is clicked in the slicer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so for example if clicked 2022 2021 2020 2018 --&amp;gt; 2022 = 50% , 2021 = 35% , 2020 = 10% ,&amp;nbsp;&lt;SPAN&gt;2018 = 10%&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it should also do it when you skip a year or more years&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so for example if clicked 2022 2020 2017 --&amp;gt; 2022 = 50% , 2020 = 35 % , 2017 = 15%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so basicly last year in selection allways have the biggest weight 50%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;next one in row from the selected gets 35%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;next one in row from the selected gets 15%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and so on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;anyone abble to help me out here, my brain been explodnig to trying to figure this out and its probably so easy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thx Mike&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 18:57:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995226#M100910</guid>
      <dc:creator>Mike_1</dc:creator>
      <dc:date>2022-12-30T18:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering years from slicer in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995258#M100911</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="492762" data-lia-user-login="Mike_1" class="lia-mention lia-mention-user"&gt;Mike_1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;many ways to do that but you need to be more specific about the weights. The latest selected year is 50% then 35% then 15% then 10% then? And how many years can be selected at once.&amp;nbsp;&lt;BR /&gt;The first thing to do is not to use CONCATENATEX -with CONTAINSSTRING but to use VALUES or ALLSELECTED with CONTAINS instead.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 19:55:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995258#M100911</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-30T19:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering years from slicer in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995346#M100920</link>
      <description>&lt;P&gt;Thx for the reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can be anything, from minumum 1 year to maximum 5 years selected&lt;/P&gt;&lt;P&gt;i use a switch() to divide the % depending on the count of the selection&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;('Calendar'[Jaar])) outputs 1 2 3 4 or 5&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;the total will allways be 100% ( made a mistake in first post making it 105% ^^ )&lt;/DIV&gt;&lt;DIV&gt;so if only 1 is selected = 100%&lt;/DIV&gt;&lt;DIV&gt;2 selected , latest year 60% , other 40%&lt;/DIV&gt;&lt;DIV&gt;3 selected , latest year 50% , next in line 35%, next in line 15 %&lt;/DIV&gt;&lt;DIV&gt;4 selected , latest year 40% , next in line 30%, next 15%, next 5%&lt;BR /&gt;etc&lt;/DIV&gt;&lt;DIV&gt;but yeah like i said i need to tell the formula witch year needs what %&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Dec 2022 22:01:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995346#M100920</guid>
      <dc:creator>Mike_1</dc:creator>
      <dc:date>2022-12-30T22:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ordering years from slicer in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995552#M100928</link>
      <description>&lt;P&gt;Figured it out, got it working now&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;used RANKX to give them a prio, works like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;got rid of the&amp;nbsp;&lt;SPAN&gt;CONCATENATEX and&amp;nbsp;ONTAINSSTRING aswell, much better now, ty &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Dec 2022 07:41:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ordering-years-from-slicer-in-dax/m-p/2995552#M100928</guid>
      <dc:creator>Mike_1</dc:creator>
      <dc:date>2022-12-31T07:41:23Z</dc:date>
    </item>
  </channel>
</rss>

