<?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: Measure case based on other column text values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901560#M94526</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470978" data-lia-user-login="fosterXO" class="lia-mention lia-mention-user"&gt;fosterXO&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To obtain correct total you can may try&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measur =
SUMX (
    VALUES ( 'Table'[Column1] ),
    CALCULATE (
        IF (
            'Table'[Column1] = "A",
            SUM ( 'Table'[Column2] ),
            MAX ( 'Table'[Column2] )
        )
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 12 Nov 2022 18:00:51 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-11-12T18:00:51Z</dc:date>
    <item>
      <title>Measure case based on other column text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901459#M94519</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a big model in PowerBI where there are many different aggregation and grouping based on columns being displayed or not on the final table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Simplifying: I need to do a conditional statement doing the &lt;U&gt;&lt;STRONG&gt;sum if the value of column 1 is A1 but doing &lt;STRONG&gt;&lt;U&gt;the MAX() if the value of column 1 is A2.&lt;/U&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;U&gt;&amp;nbsp;&lt;/U&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;U&gt;&lt;img /&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to have that information in the same colum of the final output. How would you go for this one?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 15:22:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901459#M94519</guid>
      <dc:creator>fosterXO</dc:creator>
      <dc:date>2022-11-12T15:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Measure case based on other column text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901501#M94521</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If(selectedvalue(Column1)="A1",sum(column2),Max (Column2))&lt;/P&gt;
&lt;P&gt;if you have more choice of column1 values make the if statement each time&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 16:40:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901501#M94521</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-12T16:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Measure case based on other column text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901523#M94523</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470978" data-lia-user-login="fosterXO" class="lia-mention lia-mention-user"&gt;fosterXO&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with Anonymous&lt;/a&gt;&amp;nbsp;. But the result would be in a separate column. Power BI would not let you show this data in the same column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 16:49:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901523#M94523</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2022-11-12T16:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Measure case based on other column text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901560#M94526</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470978" data-lia-user-login="fosterXO" class="lia-mention lia-mention-user"&gt;fosterXO&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To obtain correct total you can may try&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measur =
SUMX (
    VALUES ( 'Table'[Column1] ),
    CALCULATE (
        IF (
            'Table'[Column1] = "A",
            SUM ( 'Table'[Column2] ),
            MAX ( 'Table'[Column2] )
        )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 12 Nov 2022 18:00:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2901560#M94526</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-11-12T18:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Measure case based on other column text values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2902689#M94591</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470978" data-lia-user-login="fosterXO" class="lia-mention lia-mention-user"&gt;fosterXO&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
SWITCH (
    TRUE (),
    MAX ( 'Table'[Column1] ) = "A1",
        SUMX (
            FILTER (
                ALL ( 'Table' ),
                'Table'[Column1] = SELECTEDVALUE ( 'Table'[Column1] )
            ),
            'Table'[Column2]
        ),
    MAX ( 'Table'[Column1] ) = "A2",
        MAXX (
            FILTER (
                ALL ( 'Table' ),
                'Table'[Column1] = SELECTEDVALUE ( 'Table'[Column1] )
            ),
            'Table'[Column2]
        ),
    BLANK ()
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaing, please provide more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 05:49:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-case-based-on-other-column-text-values/m-p/2902689#M94591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-14T05:49:45Z</dc:date>
    </item>
  </channel>
</rss>

