<?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: Calendar in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4035280#M54108</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/629741"&gt;@LearnToFly&lt;/a&gt;&amp;nbsp;, Hope you are doing good!&lt;/P&gt;&lt;P&gt;To manage multiple date fields in Power BI, create a calendar table with an active relationship to Date Completed and inactive relationships to Date Filled and Date Written. Use the USERELATIONSHIP DAX function to activate these relationships in measures. For example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Total Completed = SUM(FactTable[Value])&lt;BR /&gt;Total Filled = CALCULATE(SUM(FactTable[Value]), USERELATIONSHIP(FactTable[DateFilled], Calendar[Date]))&lt;BR /&gt;Total Written = CALCULATE(SUM(FactTable[Value]), USERELATIONSHIP(FactTable[DateWritten], Calendar[Date]))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example of Using Slicers to Switch Dates&lt;/P&gt;&lt;P&gt;You can also add a slicer or parameter to allow users to switch between these date fields dynamically. This can be done using a disconnected table and SWITCH function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a Date Selection Table:&lt;BR /&gt;Create a table with options for each date field. For example:&lt;/P&gt;&lt;P&gt;DateSelection&lt;BR /&gt;Date Completed&lt;BR /&gt;Date Filled&lt;BR /&gt;Date Written&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Create a Measure to Select Date:&lt;BR /&gt;SelectedDateMeasure =&lt;BR /&gt;SWITCH (&lt;BR /&gt;SELECTEDVALUE(DateSelection[DateSelection]),&lt;BR /&gt;"Date Completed", [Total Completed],&lt;BR /&gt;"Date Filled", [Total Filled],&lt;BR /&gt;"Date Written", [Total Written],&lt;BR /&gt;BLANK()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add Slicer and Use Measure:&lt;BR /&gt;Add the DateSelection column as a slicer to your report and use the SelectedDateMeasure in your visuals.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2024 17:24:16 GMT</pubDate>
    <dc:creator>anmolmalviya05</dc:creator>
    <dc:date>2024-07-10T17:24:16Z</dc:date>
    <item>
      <title>Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4034680#M54095</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;If you are working with a table in Power BI that contains three different date fields... a date completed, date filled, and date written but you need to build a table based on completed for one and another table for date written what is the best way to accomplish this?&amp;nbsp; I have created a separate calendar and have one relationship active, but it only allows one and there are times in my reporting in which I need to switch which date I am pulling from.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jul 2024 13:06:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4034680#M54095</guid>
      <dc:creator>LearnToFly</dc:creator>
      <dc:date>2024-07-10T13:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4034731#M54096</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/629741"&gt;@LearnToFly&lt;/a&gt;&amp;nbsp;You have basically 2 options. You can create multiple relationships and then use USERELATIONSHIP in measures or you can create 3 separate calendar tables. OK, a third option is to just ditch the calendar table and just straight use the date columns in the fact table but some folks would frown on that approach although it would work perfectly fine for the majority of scenarios.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 13:23:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4034731#M54096</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-07-10T13:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4034857#M54100</link>
      <description>&lt;P&gt;Thanks, Greg, I did try to do the USERELATIONSHIP option however I also needed to slice on it.&amp;nbsp; Therefore, I guess my only option is multiple calendars...I just really haven't seen others using that approach but will try it out of necessity.&amp;nbsp; Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 14:12:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4034857#M54100</guid>
      <dc:creator>LearnToFly</dc:creator>
      <dc:date>2024-07-10T14:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4035280#M54108</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/629741"&gt;@LearnToFly&lt;/a&gt;&amp;nbsp;, Hope you are doing good!&lt;/P&gt;&lt;P&gt;To manage multiple date fields in Power BI, create a calendar table with an active relationship to Date Completed and inactive relationships to Date Filled and Date Written. Use the USERELATIONSHIP DAX function to activate these relationships in measures. For example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Total Completed = SUM(FactTable[Value])&lt;BR /&gt;Total Filled = CALCULATE(SUM(FactTable[Value]), USERELATIONSHIP(FactTable[DateFilled], Calendar[Date]))&lt;BR /&gt;Total Written = CALCULATE(SUM(FactTable[Value]), USERELATIONSHIP(FactTable[DateWritten], Calendar[Date]))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example of Using Slicers to Switch Dates&lt;/P&gt;&lt;P&gt;You can also add a slicer or parameter to allow users to switch between these date fields dynamically. This can be done using a disconnected table and SWITCH function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a Date Selection Table:&lt;BR /&gt;Create a table with options for each date field. For example:&lt;/P&gt;&lt;P&gt;DateSelection&lt;BR /&gt;Date Completed&lt;BR /&gt;Date Filled&lt;BR /&gt;Date Written&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Create a Measure to Select Date:&lt;BR /&gt;SelectedDateMeasure =&lt;BR /&gt;SWITCH (&lt;BR /&gt;SELECTEDVALUE(DateSelection[DateSelection]),&lt;BR /&gt;"Date Completed", [Total Completed],&lt;BR /&gt;"Date Filled", [Total Filled],&lt;BR /&gt;"Date Written", [Total Written],&lt;BR /&gt;BLANK()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add Slicer and Use Measure:&lt;BR /&gt;Add the DateSelection column as a slicer to your report and use the SelectedDateMeasure in your visuals.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 17:24:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calendar/m-p/4035280#M54108</guid>
      <dc:creator>anmolmalviya05</dc:creator>
      <dc:date>2024-07-10T17:24:16Z</dc:date>
    </item>
  </channel>
</rss>

