<?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: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3218317#M117550</link>
    <description>&lt;P&gt;Hello Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found it out, and in general very easy and also logical. But I didn't think about this. But all you need to do is a measure and use a filter. For testing I had created a simple measure and a simple measure to get the result;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __NotASlicer = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;('NotASlicer'[Column1])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __Result = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;( __NotASlicer,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"MTD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"MTD Is being selected"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"YTD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"YTD Is being selected"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"QTD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"QTD Is being selected"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; __Result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;And the test measure I have;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure 2 = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'NotASlicer'[Measure],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'NotASlicer'[Column1] &lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN&gt;"QTD"&lt;/SPAN&gt;&lt;SPAN&gt; })&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I'm sure you know this, but I mention this, as maybe someone else is also looking for such.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I want to thank you both Tamerj1 and Greg for the help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hans&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 03 May 2023 16:22:45 GMT</pubDate>
    <dc:creator>Invisibleman</dc:creator>
    <dc:date>2023-05-03T16:22:45Z</dc:date>
    <item>
      <title>With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212450#M117201</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my project, I want to create 1 measure, that will need to calculate based on a variable value. With a slicer, I use the switch( command and selectedvalue to create a variable and then the formula I need. For this I have the table with the selections 1. Current Year, 2. Previous Year, 3. All Years&lt;BR /&gt;&lt;BR /&gt;But now I want to have a switch function without the slicer. where the variable in the formula will be Variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say I have the measure with the formula Check the data = calculate( calendar[CurrentYearYesNo] = Variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Another measure I then want to have something like GoToChecktheDate = Variable = "Current Year", 'Check the Data' or maybe something like GoToChecktheData = Check the Data [Current Year]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any option/posibility in power bi to do so?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 21:44:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212450#M117201</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-04-29T21:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212812#M117227</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="543178" data-lia-user-login="Invisibleman" class="lia-mention lia-mention-user"&gt;Invisibleman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you please clarify further perhaps with some screenshots and a couple of well illustrated examples?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 15:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212812#M117227</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-30T15:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212821#M117228</link>
      <description>&lt;P&gt;Hello tamerj1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry, but I can't get a screenshot, as I don't get it to work, as I want. But I make some more explanation in the word document. Maybe this will also help. To write all down in this tipic, I think it will be too long.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See here my word document with more details;&amp;nbsp;&lt;A href="https://1drv.ms/w/s!AilbSzpcmSsXgj2oHbZk09JrDqSg?e=ENgB71" target="_self"&gt;Word document for explanation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 15:45:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212821#M117228</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-04-30T15:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212936#M117234</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="543178" data-lia-user-login="Invisibleman" class="lia-mention lia-mention-user"&gt;Invisibleman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The subject is clear. What is not so clear is your requirement. What exactly are you trying to accomplish?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 19:17:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3212936#M117234</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-30T19:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3213903#M117287</link>
      <description>&lt;P&gt;Hello Tamerj1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I do try to achieve, is to get a sort of slicer selection without the use of a slicer. So I am in general looking for some sort of a variable that will work thru out the whole project. And not like the VAR which seems only to be working inside a measure and not outside.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I can make the coding shorter, easier and I guess it will also make it working faster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 14:55:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3213903#M117287</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-05-01T14:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214031#M117298</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="543178" data-lia-user-login="Invisibleman" class="lia-mention lia-mention-user"&gt;Invisibleman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a feeling that what you want to accomplish is not that complex. Yet, I still cannot figure out what exactly are you trying to describe. What do you mean by "&lt;SPAN&gt;&lt;EM&gt;to get a sort of slicer selection without the use of a slicer&lt;/EM&gt;"?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 16:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214031#M117298</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-01T16:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214283#M117321</link>
      <description>&lt;P&gt;Hello Tamerj1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I mean by this, is when you have a slicer and you select 1 button, then you can do a switch call from there. As you have the slicer's value by the selection of the button. Like you have the 3 buttons; MTD, QTD &amp;amp; YTD, when pressing the YTD button you can use the SELECTEDVALUE and call the switch function to calcuate the YTD command that you have set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't want to have a button to press, I want to do thru a measure. Which will work as if you pressed a button YTD (without actually have such button), but not actually pressing one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 19:32:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214283#M117321</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-05-01T19:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214314#M117326</link>
      <description>&lt;P&gt;&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;/P&gt;
&lt;P&gt;would you mind help out on this. I'm having difficulties understanding the requirement. Feeling a little bit embarrassed. Appreciate you valuable input.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 19:53:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214314#M117326</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-01T19:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214327#M117328</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="543178" data-lia-user-login="Invisibleman" class="lia-mention lia-mention-user"&gt;Invisibleman&lt;/a&gt;&amp;nbsp;Here's my best guess on this one. Create a disconnected table with the text values, 1 per row of:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Column1&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;YTD&lt;/P&gt;
&lt;P&gt;QTD&lt;/P&gt;
&lt;P&gt;MTD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's call this table "NotASlicer". In your measure, then you would do this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
  VAR __NotASlicer = MAX('NotASlicer'[Column1])
  VAR __Result = 
    SWITCH( __NotASlicer,
      // put some code here
    )
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 01 May 2023 20:01:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214327#M117328</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-05-01T20:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214328#M117329</link>
      <description>&lt;P&gt;&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;/P&gt;
&lt;P&gt;Wow! That was such a super fast response &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 20:05:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214328#M117329</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-01T20:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214363#M117333</link>
      <description>&lt;P&gt;Hello Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the measure. But I don't understand, how I will need to call this measure, from another measure, to get the MTD, QTD or YTD which ever I at that moment need. Or can I just call it like measure["MTD"], Measure[QTD] or measure[YTD] depending on that what I need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sorry, I am trying to understand, as I am still somewhat new to this &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;Regards,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 20:33:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3214363#M117333</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-05-01T20:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3217288#M117481</link>
      <description>&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/313" target="_blank"&gt;@Greg_Deckler&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I do understand the code you send to me and also what is happening there. Thanks for that. But untill now I still don't understand, in the way I can get this to work from another measure (without the use of any slicer or such). I am trying to find the answer on the internet, but there they all are speaking about the VAR function inside a measure and not in the way how I can address this VAR measure from another measure assigning the value to the VAR measure function. In your example the ____NotASlicer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As example I have the measure; SendValueToVAR and I want to have the VAR calculate the QTD, how do I write that code?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't use measure["QTD"] as when I want to addres the measure I only can say measure[Column1]. So here I am very stuck. Can you please help me with that part too??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hans&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 07:46:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3217288#M117481</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-05-03T07:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3218317#M117550</link>
      <description>&lt;P&gt;Hello Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found it out, and in general very easy and also logical. But I didn't think about this. But all you need to do is a measure and use a filter. For testing I had created a simple measure and a simple measure to get the result;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __NotASlicer = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;('NotASlicer'[Column1])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __Result = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;( __NotASlicer,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"MTD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"MTD Is being selected"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"YTD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"YTD Is being selected"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"QTD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"QTD Is being selected"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; __Result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;And the test measure I have;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure 2 = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'NotASlicer'[Measure],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'NotASlicer'[Column1] &lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN&gt;"QTD"&lt;/SPAN&gt;&lt;SPAN&gt; })&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I'm sure you know this, but I mention this, as maybe someone else is also looking for such.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I want to thank you both Tamerj1 and Greg for the help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hans&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 May 2023 16:22:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3218317#M117550</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-05-03T16:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: With a slicer and selectedvalue I use a switch. But is there also an option without the slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3257827#M120365</link>
      <description>&lt;P&gt;Hello Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have now a problem with the formula and I have no idea why/how to solve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to have the same situation, but with multiple selections, and also not the MTD, QTD, YTD, but here it is always showing the me the highest value/name. So I can't make the selection as it is in your example, which does work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you also please help me with this? I have added the excel file, I used for the data and also the test Power BI, with your formula (MTD, QTD &amp;amp; YTD) and also mine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/x/s!AilbSzpcmSsXgl35hw-R7S-8YLkr?e=Rcr1H6" target="_self"&gt;The Excel file with the data&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AilbSzpcmSsXglxd-PMkr6JAdL_n?e=lJ12NP" target="_self"&gt;The Power BI File&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 10:41:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/With-a-slicer-and-selectedvalue-I-use-a-switch-But-is-there-also/m-p/3257827#M120365</guid>
      <dc:creator>Invisibleman</dc:creator>
      <dc:date>2023-05-29T10:41:36Z</dc:date>
    </item>
  </channel>
</rss>

