<?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: IF value exists on calendar date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263919#M54802</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp; OP did not mention anyhting about the data model,&amp;nbsp; so my starting point was unrelated tables. Thanks again !!!&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jan 2022 17:26:03 GMT</pubDate>
    <dc:creator>smpa01</dc:creator>
    <dc:date>2022-01-03T17:26:03Z</dc:date>
    <item>
      <title>IF value exists on calendar date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263790#M54794</link>
      <description>&lt;P&gt;Hi everyone, i need help creating a measure that evaluates whether a value in on table exists at a particular date within the calender table .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with Two tables, on main table that has a customer and a purchase date. The second table is just a table showing the daily calendar dates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the outcome wanted is to evaluate whether a purchase was made by a customer at a certain date on the daily calender.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the tables are as shown below :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RESULT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If a customer has&amp;nbsp; purchased something on the date equivalent to the calendar date, return true, else false. as shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone could assist me with writing a measure that could produce this outcome that would be wonderful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; all help and sugegestions are welcome:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 16:00:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263790#M54794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-03T16:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: IF value exists on calendar date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263830#M54797</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Something like this should do what you want:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Purchased = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;PurchaseBoolean&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;'PurchaseBoolean'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;FALSE&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;())&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Start data:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;End result (Use calendar for axis):&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;img /&gt;&lt;BR /&gt;(Ignore the Matt Matt. I made a typo in my test data&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;I hope this helps and if it does consider accepting this as a solution and giving a thumbs up!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Jan 2022 16:30:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263830#M54797</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-03T16:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: IF value exists on calendar date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263838#M54798</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; you can use a measure like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _cust =
    MAX ( t1[customer] )
VAR _date =
    MAX ( 'Calendar'[Date] )
VAR _temp =
    CROSSJOIN (
        SELECTCOLUMNS ( { _cust }, "cust", [Value] ),
        SELECTCOLUMNS ( { _date }, "dt", [Value] )
    )
VAR _date2 =
    CALCULATE (
        MAX ( t1[purchse_date] ),
        TREATAS ( _temp, t1[customer], t1[purchse_date] )
    )
RETURN
    IF ( _date2 = BLANK (), "false", "true" )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 16:30:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263838#M54798</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-01-03T16:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: IF value exists on calendar date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263907#M54801</link>
      <description>&lt;P&gt;If the calendar table is related to the purchase date, then all you need is&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Measure1 = NOT ISEMPTY ( t1 )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Jan 2022 17:21:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263907#M54801</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-01-03T17:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: IF value exists on calendar date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263919#M54802</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp; OP did not mention anyhting about the data model,&amp;nbsp; so my starting point was unrelated tables. Thanks again !!!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 17:26:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263919#M54802</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-01-03T17:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: IF value exists on calendar date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263931#M54805</link>
      <description>&lt;P&gt;Yeah, without the relationship, it needs a TREATAS or similar application of the date filter.&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;CALCULATE (
    NOT ISEMPTY ( t1 ),
    TREATAS ( VALUES ( 'Calendar'[Date] ), t1[purchse_date] )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Jan 2022 17:38:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/2263931#M54805</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-01-03T17:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: IF value exists on calendar date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/4384003#M174011</link>
      <description>&lt;P&gt;I have a slightly different problem with these dates:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a percentage table that for existing dates should return 1-tx and not show all other dates&lt;/P&gt;&lt;P&gt;Now, as for each occurence where tx does not exist, 1-tx gives 100%, even when showing only Q1,&lt;BR /&gt;I get results per week 1-52 with all weeks outside Q1 showing 100%...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I force PBI to only show weeks within the selected filter?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 09:46:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-value-exists-on-calendar-date/m-p/4384003#M174011</guid>
      <dc:creator>SteveFaber</dc:creator>
      <dc:date>2025-01-28T09:46:30Z</dc:date>
    </item>
  </channel>
</rss>

