<?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 CALCULATE(VALUES(*column name*)) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-VALUES-column-name/m-p/3229436#M118454</link>
    <description>&lt;P class=""&gt;Hi everyone,&lt;/P&gt;&lt;P class=""&gt;I am not very expert in DAX language, but I can program. However, I don't find really straight forward some mechanics of the language.&lt;BR /&gt;I am struggling to try to understand what this command does. I am working on a decently big project and part of the code was previously made by an expert. I have a measure in this project that needs to calculate some costs. However, my issue is understanding what the command "CALCULATE(VALUES(*Table name[column name]*) returns.&lt;/P&gt;&lt;P class=""&gt;In particular, it is inside a SUMX and the code is this:&lt;/P&gt;&lt;P class=""&gt;SUMX(&lt;BR /&gt;*Table name 1*,&lt;BR /&gt;[*a measure that returns an integer*]*&lt;BR /&gt;CALCULATE( VALUES (*Table name[column name]*))&lt;BR /&gt;)&lt;/P&gt;&lt;P class=""&gt;Thank you very much for answering.&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2023 22:03:09 GMT</pubDate>
    <dc:creator>uaTaG87</dc:creator>
    <dc:date>2023-05-10T22:03:09Z</dc:date>
    <item>
      <title>CALCULATE(VALUES(*column name*))</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-VALUES-column-name/m-p/3229436#M118454</link>
      <description>&lt;P class=""&gt;Hi everyone,&lt;/P&gt;&lt;P class=""&gt;I am not very expert in DAX language, but I can program. However, I don't find really straight forward some mechanics of the language.&lt;BR /&gt;I am struggling to try to understand what this command does. I am working on a decently big project and part of the code was previously made by an expert. I have a measure in this project that needs to calculate some costs. However, my issue is understanding what the command "CALCULATE(VALUES(*Table name[column name]*) returns.&lt;/P&gt;&lt;P class=""&gt;In particular, it is inside a SUMX and the code is this:&lt;/P&gt;&lt;P class=""&gt;SUMX(&lt;BR /&gt;*Table name 1*,&lt;BR /&gt;[*a measure that returns an integer*]*&lt;BR /&gt;CALCULATE( VALUES (*Table name[column name]*))&lt;BR /&gt;)&lt;/P&gt;&lt;P class=""&gt;Thank you very much for answering.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 22:03:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-VALUES-column-name/m-p/3229436#M118454</guid>
      <dc:creator>uaTaG87</dc:creator>
      <dc:date>2023-05-10T22:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATE(VALUES(*column name*))</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-VALUES-column-name/m-p/3229448#M118457</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="558661" data-lia-user-login="uaTaG87" class="lia-mention lia-mention-user"&gt;uaTaG87&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;A one row one column table can be used as single value in DAX. So your code makes sense only when VALUES() returns a single value,&amp;nbsp;&lt;SPAN&gt;as&amp;nbsp;CALCULATE expects a expression returning a single value. Otherwise, it prompts error.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 May 2023 22:17:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATE-VALUES-column-name/m-p/3229448#M118457</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-10T22:17:18Z</dc:date>
    </item>
  </channel>
</rss>

