<?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: Convert Selected date into number in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508575#M5572</link>
    <description>&lt;P&gt;i am trying to convert selected date in a sheet into a number, i can get selected date by using getselectedfield(date,',') now i want to convert into number.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Mar 2025 11:33:31 GMT</pubDate>
    <dc:creator>Harish_Qlik</dc:creator>
    <dc:date>2025-03-06T11:33:31Z</dc:date>
    <item>
      <title>Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508573#M5570</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;is there any way to convert selected date into numeric? i want to convert 'GetFieldSelected(date,';')' into a number format?&lt;/P&gt;
&lt;P&gt;i tried 'num(GetFieldSelected(Activitymonth,';'))' but its not working.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 11:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508573#M5570</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-06T11:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508574#M5571</link>
      <description>&lt;P&gt;just&lt;/P&gt;
&lt;P&gt;num(date)? should work for you.&lt;/P&gt;
&lt;P&gt;Didn't understood your question. Can you elaborate little bit more&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 11:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508574#M5571</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2025-03-06T11:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508575#M5572</link>
      <description>&lt;P&gt;i am trying to convert selected date in a sheet into a number, i can get selected date by using getselectedfield(date,',') now i want to convert into number.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 11:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508575#M5572</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-06T11:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508576#M5573</link>
      <description>&lt;P&gt;Why are you using GetSelectedField()?&lt;/P&gt;
&lt;P&gt;Just Num(DateFieldName), assuming one has been selected this should work. If it doesn't, your "date" is probably a string rather than a date and needs to be converted using Date#(). &lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 11:36:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508576#M5573</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2025-03-06T11:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508654#M5575</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;i would like to store my current selected date values in a variable in numerical format (single value or multiple) so i can use that variable in Sheet action, currently i am using Getfieldselections(monthname), but the return i am getting is String value.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 16:37:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508654#M5575</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-06T16:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508664#M5576</link>
      <description>&lt;P&gt;If your date value is actually a string and not an actual date-formatted date, you can use date#(). If your date is e.g. '2024-12-31' you can do this: num(date#('2024-12-31', 'YYYY-MM-DD'))&lt;/P&gt;
&lt;P&gt;But that's kind of a sidenote. It seems that you are saying that you can have multiple selected different dates. In this case, getfieldselections(monthname) will result in a string like for example ''2024-12-31,2025-03-07' and you can't convert that into a number. I suppose that you want to convert it into a string with multiple numbers, something like '4711,4712'.&lt;/P&gt;
&lt;P&gt;Maybe you could use concat(distinct num(monthname),',') instead of getfieldselections. Because just like&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6142"&gt;@Or&lt;/a&gt;&amp;nbsp;said, it sounds like you don't actually need GetFieldSelections() in this case.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 17:43:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508664#M5576</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-03-06T17:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508821#M5578</link>
      <description>&lt;P&gt;Hi Henri&lt;/P&gt;
&lt;P&gt;Let me elaborate my requirements,&lt;/P&gt;
&lt;P&gt;i have multiple sheets, which have same type of fields and data only the group name is different, i have separated the sheets based on groups, when i select activity month (date field) and when i go to next group sheet i want to see same selection but for different group, even if i select multiple dates i should see multiple values selected in next sheet, also i when i land on any page by default it should select my reporting month which is previous month of current date. i am able to achieved all of this by storing my current selections in a variable, but only issue is when i select multiple dates and go to next sheet the selection automatically removed,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i hope i am able to explain my requirements.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 16:54:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508821#M5578</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-07T16:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508850#M5579</link>
      <description>&lt;P&gt;Are you using&amp;nbsp;&lt;EM&gt;actions&lt;/EM&gt; that are triggered on sheet opening, that modified the selections? (If you aren't, selections should not change just because you change sheet, uless sheets are in&amp;nbsp;&lt;EM&gt;alternate states&lt;/EM&gt;.) How are those actions defined?&lt;/P&gt;
&lt;P&gt;I don't understand why you are storing your current selections in a variable - what is the purpose of that?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 21:47:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508850#M5579</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-03-07T21:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508896#M5585</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;yes, i am using Sheet action for my all sheets, because when i open any sheet i want by default reporting date should be selected (like we are in March, my reporting month should be selected February) by default, similarly if i made changes in my date selection (like if i selected January or December and January both month) and if i move to different sheet my new selections should apply,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;everything is working what i am expecting by storing selection values in a variable (GetfieldSelections(Fieldname,';') and in Sheet action i selected 'select value in a field' and in value field i mentioned the variable name, however my challenges are when i select multiple dates, that's where my sheet action does not work,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if i add multiple dates manually in numeric datatype in the variable it's working but when i use getfieldselections it doesn't work, i understand when i use getfieldselections it stores the values in string datatype.&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>Sun, 09 Mar 2025 21:17:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508896#M5585</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-09T21:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508951#M5587</link>
      <description>&lt;P&gt;Normally, without any sheet actions, selections stay with the user even when changing sheets. You can make selections on one sheet, go to another sheet and the same selections will still be there.&lt;/P&gt;
&lt;P&gt;GetFieldSelections holds the current selections, and therefore your variable will change immediately when selections change. If your sheet action changes your selections, the variable will change accordingly.&lt;/P&gt;
&lt;P&gt;It sounds like you need to take another approach. You could for example use if-statements to always use previous month in your calculations, unless there are selections made in the date fields. Or you could use a dynamic default bookmark that makes sure that the app opens with previous month selected, but after that it's up to what the users selects.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 09:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2508951#M5587</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-03-10T09:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509056#M5593</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes i am using current selection in a variable by using&amp;nbsp; if(GetSelectedCount(ReportingMonth)=0,MonthName(AddMonths(Today(),-1)),GetFieldSelections(ReportingMonth,';')), and in sheet action i am reffering to this variable,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;could you please advice how make&amp;nbsp;&lt;SPAN&gt;dynamic default bookmark that makes sure that the app opens with previous month selected, but after that it's up to what the users selects??&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 14:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509056#M5593</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-10T14:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509059#M5594</link>
      <description>&lt;P&gt;Ok, but GetFieldSelections(ReportingMonth,';') will give you a semi-colon separated string.How do you use the variable to make it into a new selection? You say you are "reffering to the variable", but how?&lt;/P&gt;
&lt;P&gt;See this support video on how to create dynamic default bookmark:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/video/tFyqOigqnUw" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.qlik.com/en-US/video/tFyqOigqnUw&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 15:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509059#M5594</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-03-10T15:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509094#M5596</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/330621"&gt;@Harish_Qlik&lt;/a&gt;, &lt;/P&gt;
&lt;P&gt;do you set your variable by evaluating this equation? &lt;/P&gt;
&lt;P&gt;If not, do so:&lt;/P&gt;
&lt;P&gt;'$(=if(GetSelectedCount(ReportingMonth)=0,MonthName(AddMonths(Today(),-1)),GetFieldSelections(ReportingMonth,';')))'&lt;/P&gt;
&lt;P&gt;And afterwards put your variable in the 'Select Values in a field'-action like so:&lt;/P&gt;
&lt;P&gt;='$(yourVariable)'&lt;/P&gt;
&lt;P&gt;Evaluating your equation is important, because that way the string is set before you delete the user-made selections. The syntax in the second step keeps the value of the variable as a string, needed to make the right selections.&lt;/P&gt;
&lt;P&gt;Let me know if this worked for you!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 16:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509094#M5596</guid>
      <dc:creator>lennart_mo</dc:creator>
      <dc:date>2025-03-10T16:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509141#M5597</link>
      <description>&lt;P&gt;Hello Lennart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the above solution is working only when i select 'Select values matching search criteria' but no in 'Select values from a field' because the above syntax only return string value, and 'Select values from a field' is only accept numeric values, and the sheet action is working only when user select one date value, if multiple date values being selected then the sheet action doesn't work and selection for a sheet automatically disappeared.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 23:39:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509141#M5597</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-10T23:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Selected date into number</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509327#M5604</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Thank you for all your support, now finally i am able get what i was looking for..&lt;/P&gt;
&lt;P&gt;here is the solution I have applied:-&lt;/P&gt;
&lt;P&gt;First, i created a variable with the expression =if(GetSelectedCount(Reportingmonth)=0,num(MonthName(AddMonths(Today(),-1))),Concat(distinct(num(Reportingmonth)),';'))&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and in the sheet action, i choose in the action 'Select values in a field', and in the field section i choose reporting month field, and in the values expression i mentioned the variable name.&lt;/P&gt;
&lt;P&gt;the variable will return the default value(which is previous month) upon landing, and whatever i change the selection in the sheet it is carried forward to next sheet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks ones again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 16:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Convert-Selected-date-into-number/m-p/2509327#M5604</guid>
      <dc:creator>Harish_Qlik</dc:creator>
      <dc:date>2025-03-11T16:33:59Z</dc:date>
    </item>
  </channel>
</rss>

