<?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 Create multiple measures based on date in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2437513#M35346</link>
    <description>&lt;P&gt;Hi, what I need to do is to create multiple measures based on date (14different measures/dates).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;//today's date&lt;BR /&gt;MEASURE 'X'[XX] =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[ Quantity],&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'Date' ),'Date'[X Date]= DATE(Year(Today()),Month(Today()),Day(Today())))&lt;/P&gt;&lt;P&gt;//today's date +1&lt;/P&gt;&lt;P&gt;MEASURE 'X'[XX+1] =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[ Quantity],&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'Date' ),'Date'[X Date]= DATE(Year(Today()+1),Month(Today()+1),Day(Today()+1)))&lt;/P&gt;&lt;P&gt;etc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create a loop that will create 14different measures based on date from today to today+14 instead of creating separated measures?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2022 08:03:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-04-05T08:03:05Z</dc:date>
    <item>
      <title>Create multiple measures based on date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2437513#M35346</link>
      <description>&lt;P&gt;Hi, what I need to do is to create multiple measures based on date (14different measures/dates).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;//today's date&lt;BR /&gt;MEASURE 'X'[XX] =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[ Quantity],&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'Date' ),'Date'[X Date]= DATE(Year(Today()),Month(Today()),Day(Today())))&lt;/P&gt;&lt;P&gt;//today's date +1&lt;/P&gt;&lt;P&gt;MEASURE 'X'[XX+1] =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[ Quantity],&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'Date' ),'Date'[X Date]= DATE(Year(Today()+1),Month(Today()+1),Day(Today()+1)))&lt;/P&gt;&lt;P&gt;etc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create a loop that will create 14different measures based on date from today to today+14 instead of creating separated measures?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 08:03:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2437513#M35346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-05T08:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple measures based on date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2444607#M35407</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I'd like to suggest you create a parameter table with numeric values from 0 to 13, then you can use this field as the axis of your visual and use the Dax expression to extract the current parameter value for dynamic calculation.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;New table:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ParaTable =
GENERATESERIES ( 0, 13, 1 )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Measure:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dynamic quantity =
VAR selectedPara =
    MAX ( ParaTable[Values] )
RETURN
    CALCULATE (
        [ Quantity],
        FILTER ( ALL ( 'Date' ), 'Date'[X Date] = TODAY () + selectedPara )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 01:40:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2444607#M35407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-08T01:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple measures based on date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2448774#M35457</link>
      <description>&lt;P&gt;Thank you for your advice, but I need all 14measures, just looking for a solution to create them all in one move (loop) :). All 14measures are visible in the final table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 08:01:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2448774#M35457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-11T08:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple measures based on date</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2462766#M35598</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In fact, my formula can generate multiple results based on the current parameter value if you use the parameter table field on the matrix column field.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;AFAIK, current power bi desktop does not include features to bulk create multiple measures, so you need to manually create each of them instead of creating multiple measures at the same time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 07:00:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Create-multiple-measures-based-on-date/m-p/2462766#M35598</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-19T07:00:50Z</dc:date>
    </item>
  </channel>
</rss>

