<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to Create a Dynamic Grid with Month-Year Columns Based on Date Range selection in Appian?</title><link>https://community.appian.com/discussions/f/data/39154/how-to-create-a-dynamic-grid-with-month-year-columns-based-on-date-range-selection-in-appian</link><description>Hi Community, 
 I’m working on a requirement where I need to create dynamic columns in read-only grid in Appian and would appreciate some guidance. 
 
 Problem Statement: 
 I have a database table with the following columns: 
 
 
 ActivityName 
 
 
 ForecastDate</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to Create a Dynamic Grid with Month-Year Columns Based on Date Range selection in Appian?</title><link>https://community.appian.com/thread/148371?ContentTypeID=1</link><pubDate>Sat, 24 May 2025 04:45:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d4b7188d-505e-4090-a1c2-9b1973419308</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You cannot display millions of anything in an Appian interface. This is not what Appian is made for.&lt;/p&gt;
&lt;p&gt;But, as far as I understand, you do want to display only a small subset of it. Did you do an estimation of how much data you need to display?&lt;/p&gt;
&lt;p&gt;Then, calling rule in a loop is no problem in general, while doing database queries in a loop is.&lt;/p&gt;
&lt;p&gt;Did you consider using Process HQ to support this use case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Create a Dynamic Grid with Month-Year Columns Based on Date Range selection in Appian?</title><link>https://community.appian.com/thread/148364?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 17:33:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e74a4684-97ab-49a8-bf89-c76c6c592771</guid><dc:creator>Shahid</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;a href="/members/stefanhelzle0001"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;Thanks for the support so far!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;rsquo;ve made good progress &amp;mdash; I&amp;rsquo;m able to:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/2705.svg" title="White check mark"&gt;&amp;#x2705;&lt;/span&gt;&amp;nbsp;Generate all dates between the selected date range&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/2705.svg" title="White check mark"&gt;&amp;#x2705;&lt;/span&gt;&amp;nbsp;Display dynamic Month-Year columns in a grid&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/2705.svg" title="White check mark"&gt;&amp;#x2705;&lt;/span&gt;&amp;nbsp;Populate each cell with the correct ForecastAmount for its respective ActivityName and Month-Year, using an expression rule&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, I&amp;rsquo;m facing a performance issue now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since the dataset contains millions of records, and each cell in the Month-Year columns is calling an expression rule to get its value, the performance has become very slow.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My Question:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is there a better or more efficient way to display these Month-Year forecast values without making individual rule calls for each cell?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Would it be better to:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Preprocess and pivot the data in a single rule before binding it to the grid?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Use a different design approach or plug-in to optimize performance?&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any suggestions or best practices for handling large datasets with dynamic grids would be really helpful.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Create a Dynamic Grid with Month-Year Columns Based on Date Range selection in Appian?</title><link>https://community.appian.com/thread/148362?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 17:26:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:34e7cf94-99e2-45f7-b245-b112491ec8ff</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;If you plan to use a normal read only grid, you can create any number of columns dynamically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My approach to such tasks is, to first build a small prototype, assuring myself that I understand the challenge and I have solutions to all the tiny problems making up the whole thing.&lt;/p&gt;
&lt;p&gt;E.g. to get the dynamic list of months, you can use code like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!start: today(),
  local!end: date(2026, 11, 15),
  local!numMonths: (12 * year(local!end) + month(local!end)) - (12 * year(local!start) + month(local!start)),
  local!months: a!forEach(
    items: enumerate(local!numMonths),
    expression: a!addDateTime(
      startDateTime: local!start,
      months: fv!item
    )
  ),
  local!months
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>