<?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 Many-To-Many Date Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277806#M499256</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My data shows sales data with two date fields: "ServiceDate" and "BatchDate" (the date posted to the general ledger).&amp;nbsp; My master calendar is built on ServiceDate, and that works for all of the objects in my project except one.&amp;nbsp; I need to show that one chart based on BatchDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached data example.&amp;nbsp; The real problem is that there is a many-to-many relationship here.&amp;nbsp; Revenue for any ServiceDate may be posted on multiple BatchDates, and any BatchDate may include data from multiple ServiceDates.&amp;nbsp; As a result, I can't use a simple statement in my script like: &lt;/P&gt;&lt;P&gt;if(BatchDate=ServiceDate).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the end user to select a ServiceDate from the calendar, and have this one chart display sales data based on BatchDate, including all ServiceDates posted to the GL on that day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea on how to accomplish this, or am I out of luck?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2011 13:17:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-13T13:17:20Z</dc:date>
    <item>
      <title>Many-To-Many Date Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277806#M499256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My data shows sales data with two date fields: "ServiceDate" and "BatchDate" (the date posted to the general ledger).&amp;nbsp; My master calendar is built on ServiceDate, and that works for all of the objects in my project except one.&amp;nbsp; I need to show that one chart based on BatchDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached data example.&amp;nbsp; The real problem is that there is a many-to-many relationship here.&amp;nbsp; Revenue for any ServiceDate may be posted on multiple BatchDates, and any BatchDate may include data from multiple ServiceDates.&amp;nbsp; As a result, I can't use a simple statement in my script like: &lt;/P&gt;&lt;P&gt;if(BatchDate=ServiceDate).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the end user to select a ServiceDate from the calendar, and have this one chart display sales data based on BatchDate, including all ServiceDates posted to the GL on that day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea on how to accomplish this, or am I out of luck?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 13:17:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277806#M499256</guid>
      <dc:creator />
      <dc:date>2011-07-13T13:17:20Z</dc:date>
    </item>
    <item>
      <title>Many-To-Many Date Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277807#M499257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean with&lt;/P&gt;&lt;P&gt;"My master calendar is built on ServiceDate" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would assume that your master calendar is not build on any other date fields, but entirely cover a certain timespan. Then I would link the master calendar as well to ServiceDate as to BatchDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably I do misunderstand something, could you post the relevant table view of your data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 14:36:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277807#M499257</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-13T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Many-To-Many Date Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277808#M499258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the attached file (export.png) for my table view.&amp;nbsp; My Master Calendar is built off of the KeyDate, which is created in the script in the BarChargeTransactions table as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Date(ServiceDate) AS KeyDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I give the users a group of list boxes at the top of each tab in the app, where they select the time period they wish to view.&amp;nbsp; (See Calendar List Boxes.gif)&amp;nbsp; Those list boxes are created in the Master Calendar script, and are based on KeyDate .&amp;nbsp; So, when users make their selections in those list boxes, all of the objects show data for the selected KeyDate(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of my objects in this app use KeyDate, except the one that shows daily revenue.&amp;nbsp; That must show revenue by day, using BatchDate.&amp;nbsp; I don't want to ask my users to clear their date selections, then select the BatchDate(s) they want to see.&amp;nbsp; So, what I want to do is create an expression that looks at the KeyDate(s) selected in the list boxes, and shows me total charges based on the BatchDate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned earlier, I can't use an IF statement in the script, like "IF(BatchDate=KeyDate, Sum(ChargeAmount))".&amp;nbsp; That would omit charges with KeyDates that are not equal to the BatchDate.&amp;nbsp; I can't think of a way to do it using set analysis either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm starting to believe that the many-to-many relationship between KeyDate and BatchDate means this is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very new to this, so any ideas are welcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 17:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277808#M499258</guid>
      <dc:creator />
      <dc:date>2011-07-13T17:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Many-To-Many Date Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277809#M499259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I have now an idea of what you want to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to condense of what I think makes up the problem into a small qvw using the excel data you provided above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I tried to show the total charges based on the BatchDate (w looking at KeyDate selection) and ServiceDate Amounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ended up with a short set expression. Please find my sample attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didnt't managed until now to incoporate both tables into one using a common time dimension, but as I understand, this is not your primary requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I stopped for today, If you have any questions, don't hesitate to get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 20:37:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277809#M499259</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-13T20:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Many-To-Many Date Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277810#M499260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Stefan:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the example.&amp;nbsp; That's exactly what I'm trying to show.&amp;nbsp; Unfortunately, when I apply your expression in your "Charges Based on Batch Date" table in my model, it returns zero.&amp;nbsp; I verified that all fields are correctly named, and had to change one field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try to create and upload a smaller QVW with our data.&amp;nbsp; I have to be very careful, though.&amp;nbsp; We are a hospital, and are subject to Federal privacy laws.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any other ideas, I'd be glad to hear them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 14:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277810#M499260</guid>
      <dc:creator />
      <dc:date>2011-07-14T14:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Many-To-Many Date Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277811#M499261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just an idea, you probably need to clear also the other key fields in set expression or what ever user may select:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum( {&amp;lt;BatchDate = KeyDate, KeyDate= &lt;STRONG&gt;,BillingID= ,KeyBudget= &lt;/STRONG&gt;&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 14:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Many-To-Many-Date-Issue/m-p/277811#M499261</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-14T14:37:49Z</dc:date>
    </item>
  </channel>
</rss>

