<?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 SELECTEDVALUE() with Calculation Groups sometimes returning blanks(?) when used in a table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4376018#M173739</link>
    <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;I am trying to build a report for water quality reporting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Context:&lt;/P&gt;&lt;P&gt;I have several parameters that are evaluated using a measure that is just ParameterName = AVERAGE(Parameter[ParameterName]).&lt;/P&gt;&lt;P&gt;These measures serve as the column headers in a table.&amp;nbsp; The rows are formed using a calculation group calculating that measure over different weeks in that month, the maximum weekly average, if the parameter is ph of Dissolved Oxygen, report the Min or Max value recorded, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;Certain Calculation Items are not returning values when using SELECTEDVALUE().&amp;nbsp; This is a problem because i am attempting to conditionally format based on the Calculation Item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here a simple version of the table i am using to troubleshoot:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The measure for the SelectedValue column is&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SelectedValue =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Group1&lt;/SPAN&gt;&lt;SPAN&gt;[Calculation]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I dont think the blanks are actual blanks, because when i write a measure saying If its blank, display something else, that doesn't work either.&amp;nbsp; Neither does a blank string.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Focusing on MAX Weekly Avg - the calculation item is:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This returns nothing? blank? empty?&amp;nbsp; not sure...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However this calc item returns the name.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am i missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2025 15:27:39 GMT</pubDate>
    <dc:creator>tp365</dc:creator>
    <dc:date>2025-01-22T15:27:39Z</dc:date>
    <item>
      <title>SELECTEDVALUE() with Calculation Groups sometimes returning blanks(?) when used in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4376018#M173739</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;I am trying to build a report for water quality reporting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Context:&lt;/P&gt;&lt;P&gt;I have several parameters that are evaluated using a measure that is just ParameterName = AVERAGE(Parameter[ParameterName]).&lt;/P&gt;&lt;P&gt;These measures serve as the column headers in a table.&amp;nbsp; The rows are formed using a calculation group calculating that measure over different weeks in that month, the maximum weekly average, if the parameter is ph of Dissolved Oxygen, report the Min or Max value recorded, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;Certain Calculation Items are not returning values when using SELECTEDVALUE().&amp;nbsp; This is a problem because i am attempting to conditionally format based on the Calculation Item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here a simple version of the table i am using to troubleshoot:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The measure for the SelectedValue column is&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SelectedValue =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Group1&lt;/SPAN&gt;&lt;SPAN&gt;[Calculation]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I dont think the blanks are actual blanks, because when i write a measure saying If its blank, display something else, that doesn't work either.&amp;nbsp; Neither does a blank string.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Focusing on MAX Weekly Avg - the calculation item is:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This returns nothing? blank? empty?&amp;nbsp; not sure...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However this calc item returns the name.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am i missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 15:27:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4376018#M173739</guid>
      <dc:creator>tp365</dc:creator>
      <dc:date>2025-01-22T15:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE() with Calculation Groups sometimes returning blanks(?) when used in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4376441#M173759</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="917164" data-lia-user-login="tp365" class="lia-mention lia-mention-user"&gt;tp365&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please try this approach:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MAX Weekly Avg =
IF(
    OR(
        CONTAINSSTRING(SELECTEDMEASURENAME(), "Eff pH"),
        CONTAINSSTRING(SELECTEDMEASURENAME(), "Eff DO")
    ),
    BLANK(),
    MAXX(
        ADDCOLUMNS(
            VALUES('Calendar'[DMR Week]),
            "WeeklyValue", CALCULATE(SELECTEDMEASURE())
        ),
        [WeeklyValue]
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Jan 2025 20:43:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4376441#M173759</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2025-01-22T20:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE() with Calculation Groups sometimes returning blanks(?) when used in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4376474#M173762</link>
      <description>&lt;P&gt;Thanks for the reply&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="501067" data-lia-user-login="Sahir_Maharaj" class="lia-mention lia-mention-user"&gt;Sahir_Maharaj&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The suggested Calculation Item does give the appropriate maximum weekly average, however the SelectedValue is still blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Oddly enough, the ordinal will populate, but when used in a conditional format, it doesn't register at all, even under the "else" condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the Measure i am applying as conditional formatting using field values for the column represented here:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It does not recognize if i use SelectedValues(DMR[Calculation]) or SelectedValues(DMR[Ordinal]) for [MAX Weekly Avg] even though the ordinal actually populates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 21:09:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4376474#M173762</guid>
      <dc:creator>tp365</dc:creator>
      <dc:date>2025-01-22T21:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE() with Calculation Groups sometimes returning blanks(?) when used in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4610651#M176489</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="917164" data-lia-user-login="tp365" class="lia-mention lia-mention-user"&gt;tp365&lt;/a&gt;&amp;nbsp;were you ever able to resolve this issue? I think this behavior is currently impeding my attempts to implement conditional formating for my calculation groups as well.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 17:07:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4610651#M176489</guid>
      <dc:creator>nk1025</dc:creator>
      <dc:date>2025-03-14T17:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE() with Calculation Groups sometimes returning blanks(?) when used in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4632899#M177365</link>
      <description>&lt;P&gt;I am experiencing this issue as well. Even when I try SELECTEDVALUE('Calculation group'[Ordinal]), it does not give the ordinal.&lt;BR /&gt;&lt;BR /&gt;What I did to solve it was: create a new table which summarizes the calculation group table. Create a relationship between the calculation group table and the new table. And use the new table columns in measurs for conditional formatting.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 10:03:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4632899#M177365</guid>
      <dc:creator>Nina123</dc:creator>
      <dc:date>2025-04-01T10:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE() with Calculation Groups sometimes returning blanks(?) when used in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4696005#M179849</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1250559" data-lia-user-login="Nina123" class="lia-mention lia-mention-user"&gt;Nina123&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;I would be glad to see your solution in detail.&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 12:30:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-with-Calculation-Groups-sometimes-returning-blanks/m-p/4696005#M179849</guid>
      <dc:creator>alibaba_42</dc:creator>
      <dc:date>2025-05-16T12:30:48Z</dc:date>
    </item>
  </channel>
</rss>

