<?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: URL link in values not working on previous year's values - why? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3930056#M152899</link>
    <description>&lt;P&gt;Try creating&amp;nbsp;Separate Measures for Each Year and ensure Correct Filter Context .Take a look at this :&lt;BR /&gt;Current Year Expenses URL =&lt;BR /&gt;IF (&lt;BR /&gt;ISFILTERED ( fact_table[transactionid] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( dim_link[URL] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_orgdata,&lt;BR /&gt;dim_orgdata[entity_id] = SELECTEDVALUE ( dim_orgdata[entity_id] )&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_calendar,&lt;BR /&gt;dim_calendar[year] = SELECTEDVALUE ( dim_calendar[year] )&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;fact_table,&lt;BR /&gt;fact_table[transactionid] IN VALUES ( fact_table[transactionid] )&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;BLANK ()&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For Previous Year Expenses URL :&lt;BR /&gt;Previous Year Expenses URL =&lt;BR /&gt;IF (&lt;BR /&gt;ISFILTERED ( fact_table[transactionid] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( dim_link[URL] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_orgdata,&lt;BR /&gt;dim_orgdata[entity_id] = SELECTEDVALUE ( dim_orgdata[entity_id] )&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_calendar,&lt;BR /&gt;dim_calendar[year] = VALUE ( SELECTEDVALUE ( dim_calendar[year] ) ) - 1&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;fact_table,&lt;BR /&gt;fact_table[transactionid] IN VALUES ( fact_table[transactionid] )&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;BLANK ()&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please mark this as the solution if it works for you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 May 2024 01:03:28 GMT</pubDate>
    <dc:creator>jupsimarsingh</dc:creator>
    <dc:date>2024-05-19T01:03:28Z</dc:date>
    <item>
      <title>URL link in values not working on previous year's values - why?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3928224#M152838</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A matrix displaying values from measures &lt;STRONG&gt;[expenses_current_year]&lt;/STRONG&gt; and &lt;STRONG&gt;[expenses_previous_year]&lt;/STRONG&gt;; where both measures are formatted to retrieve URL link to the related invoice, through the measure &lt;STRONG&gt;[URL link]&lt;/STRONG&gt; below. It works properly with the measure &lt;STRONG&gt;[expenses_current_year]&lt;/STRONG&gt; but fail to retrieve the URL link for values from &lt;STRONG&gt;[expenses_&lt;FONT color="#993300"&gt;previous_year&lt;FONT color="#000000"&gt;]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;.&lt;/FONT&gt; Years are stored as text in my data-sets. I tried to create a measure separately for previous year &lt;STRONG&gt;[URL link previous year expenses]&lt;/STRONG&gt; but without any success.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please guide me on how to solve this matter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF (
    ISFILTERED ( fact_table[transactionid] ),
    CONVERT (
        CALCULATE (
            MAX ( dim_link[URL] ),
            FILTER (
                dim_orgdata,
                dim_orgdata[entity_id] = SELECTEDVALUE ( dim_orgdata[entity_id] )
            ),
            FILTER (
                dim_calendar,
                dim_calendar[year] = SELECTEDVALUE ( dim_calendar[year] )
                    || VALUE ( dim_calendar[year] )
                        = SELECTEDVALUE ( dim_calendar[year] ) - 1
            ),
            FILTER (
                fact_table,
                fact_table[transactionid] IN VALUES ( fact_table[transactionid] )
            )
        ),
        STRING
    ),
    BLANK ()
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 18:19:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3928224#M152838</guid>
      <dc:creator>Mjolnir</dc:creator>
      <dc:date>2024-05-17T18:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: URL link in values not working on previous year's values - why?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3930056#M152899</link>
      <description>&lt;P&gt;Try creating&amp;nbsp;Separate Measures for Each Year and ensure Correct Filter Context .Take a look at this :&lt;BR /&gt;Current Year Expenses URL =&lt;BR /&gt;IF (&lt;BR /&gt;ISFILTERED ( fact_table[transactionid] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( dim_link[URL] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_orgdata,&lt;BR /&gt;dim_orgdata[entity_id] = SELECTEDVALUE ( dim_orgdata[entity_id] )&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_calendar,&lt;BR /&gt;dim_calendar[year] = SELECTEDVALUE ( dim_calendar[year] )&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;fact_table,&lt;BR /&gt;fact_table[transactionid] IN VALUES ( fact_table[transactionid] )&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;BLANK ()&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For Previous Year Expenses URL :&lt;BR /&gt;Previous Year Expenses URL =&lt;BR /&gt;IF (&lt;BR /&gt;ISFILTERED ( fact_table[transactionid] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( dim_link[URL] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_orgdata,&lt;BR /&gt;dim_orgdata[entity_id] = SELECTEDVALUE ( dim_orgdata[entity_id] )&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;dim_calendar,&lt;BR /&gt;dim_calendar[year] = VALUE ( SELECTEDVALUE ( dim_calendar[year] ) ) - 1&lt;BR /&gt;),&lt;BR /&gt;FILTER (&lt;BR /&gt;fact_table,&lt;BR /&gt;fact_table[transactionid] IN VALUES ( fact_table[transactionid] )&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;BLANK ()&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please mark this as the solution if it works for you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2024 01:03:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3930056#M152899</guid>
      <dc:creator>jupsimarsingh</dc:creator>
      <dc:date>2024-05-19T01:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: URL link in values not working on previous year's values - why?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3931706#M152966</link>
      <description>&lt;P&gt;Thank's for your effort, using a separate measure for previous year's URLs as you suggested now returns the URL string when the measure is being added to a column in a visual table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Though, when conditionally formatting returned values in a matrix to contain the URL for previous year, it does not work.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I add the measure, "&lt;STRONG&gt;Actual amount previous year&lt;/STRONG&gt;" to the value field in my matrixes, then under conditional formatting adding the URL, using the measure you suggest - no URL appearing in the values in the matrix. Though, your suggested measure returns the full URL string when added as a column to a visual table.&lt;BR /&gt;&lt;BR /&gt;Could it be the measure for calculating previous year's actual amount that is causing the URL issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Actual amount previous year = 
    CALCULATE (
        SUM(fact_table[amount]),
        FILTER (
            ALL(dim_calendar),
            VALUE(dim_calendar[year]) = SELECTEDVALUE(dim_calendar[year]) - 1 &amp;amp;&amp;amp;
            dim_calendar[quarter] IN VALUES(dim_calendar[quarter]) &amp;amp;&amp;amp;
            dim_calendar[month] IN VALUES(dim_calendar[month])
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 07:37:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3931706#M152966</guid>
      <dc:creator>Mjolnir</dc:creator>
      <dc:date>2024-05-20T07:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: URL link in values not working on previous year's values - why?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3934575#M153062</link>
      <description>&lt;P&gt;Any ideas? Not managed to solve this yet.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 07:37:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URL-link-in-values-not-working-on-previous-year-s-values-why/m-p/3934575#M153062</guid>
      <dc:creator>Mjolnir</dc:creator>
      <dc:date>2024-05-21T07:37:57Z</dc:date>
    </item>
  </channel>
</rss>

