<?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: Help With DAX Meassure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3677007#M142780</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="684596" data-lia-user-login="SantiagoRandado" class="lia-mention lia-mention-user"&gt;SantiagoRandado&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;try below measure&lt;/P&gt;&lt;P&gt;and for conditional formatting follow this&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Highlight-every-week-s-total-in-table/m-p/3615467#M1186088" target="_blank" rel="noopener"&gt;Link&lt;/A&gt;&amp;nbsp; for steps of conditional formatting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;max week color = 
var a= CALCULATE(MAX(Sales[week]),ALLSELECTED('Table'))
return
IF(MAX('Table'[week nu])=a,"yellow","green")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;download file from below link&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1WCio8C7uVTM6Ij8VWB8Uc8Gzwxt_eUZ8/view?usp=sharing" target="_blank" rel="noopener"&gt;Help with Dax measure&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Feb 2024 09:28:14 GMT</pubDate>
    <dc:creator>Dangar332</dc:creator>
    <dc:date>2024-02-03T09:28:14Z</dc:date>
    <item>
      <title>Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675789#M142704</link>
      <description>&lt;P&gt;I have Table Sales with this fields: Value and Date and I have a Table Calendar with Date, Year, Month, Week, Day and Month_Name.&lt;/P&gt;&lt;P&gt;I need to create a bar chart showing sales by week, making the last week's bar a different color than the rest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It must be dynamic and if change the year and/or the month, the last week in the chart must be a different color.&lt;/P&gt;&lt;P&gt;Please can somebody help me?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 14:31:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675789#M142704</guid>
      <dc:creator>SantiagoRandado</dc:creator>
      <dc:date>2024-02-02T14:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675844#M142710</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="684596" data-lia-user-login="SantiagoRandado" class="lia-mention lia-mention-user"&gt;SantiagoRandado&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;try below measure as conditional formatting&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;measure =
var a = selectedvalue(calender[date])
var b = maxx(filter(calender,calender[date]=a),calender[week])
return
if(calender[week]=b,"#FFFF00","#008000")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and follow step in below link solution&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Highlight-every-week-s-total-in-table/m-p/3615467#M1186088" target="_self"&gt;conditional formatting&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 14:58:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675844#M142710</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-02-02T14:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675894#M142717</link>
      <description>&lt;P&gt;Thanks Dangar, the meassure give me this message "A single value for column 'week' in table 'calender' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.". It is underline [week] inside the if. Do you know how to solve it?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 15:29:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675894#M142717</guid>
      <dc:creator>SantiagoRandado</dc:creator>
      <dc:date>2024-02-02T15:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675938#M142724</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="684596" data-lia-user-login="SantiagoRandado" class="lia-mention lia-mention-user"&gt;SantiagoRandado&lt;/a&gt;&amp;nbsp;Looks like it is missing an aggregation:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
var a = selectedvalue(calender[date])
var b = maxx(filter(calender,calender[date]=a),calender[week])
return
if(MAX(calender[week])=b,"#FFFF00","#008000")&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 02 Feb 2024 15:56:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675938#M142724</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-02-02T15:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675982#M142726</link>
      <description>&lt;P&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="684596" data-lia-user-login="SantiagoRandado" class="lia-mention lia-mention-user"&gt;SantiagoRandado&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;measure =&lt;/P&gt;&lt;P&gt;var a = selectedvalue(calender[date])&lt;/P&gt;&lt;P&gt;var b = maxx(filter(calender,calender[date]=a),calender[week])&lt;/P&gt;&lt;P&gt;return&lt;/P&gt;&lt;P&gt;if(max(wcalender[week])=b,"#FFFF00","#008000")&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 16:13:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3675982#M142726</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-02-02T16:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3676048#M142730</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help. but all weeks are #008000, also the last week shown un the graph&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 16:29:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3676048#M142730</guid>
      <dc:creator>SantiagoRandado</dc:creator>
      <dc:date>2024-02-02T16:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3677007#M142780</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="684596" data-lia-user-login="SantiagoRandado" class="lia-mention lia-mention-user"&gt;SantiagoRandado&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;try below measure&lt;/P&gt;&lt;P&gt;and for conditional formatting follow this&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Highlight-every-week-s-total-in-table/m-p/3615467#M1186088" target="_blank" rel="noopener"&gt;Link&lt;/A&gt;&amp;nbsp; for steps of conditional formatting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;max week color = 
var a= CALCULATE(MAX(Sales[week]),ALLSELECTED('Table'))
return
IF(MAX('Table'[week nu])=a,"yellow","green")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;download file from below link&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1WCio8C7uVTM6Ij8VWB8Uc8Gzwxt_eUZ8/view?usp=sharing" target="_blank" rel="noopener"&gt;Help with Dax measure&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2024 09:28:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3677007#M142780</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-02-03T09:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help With DAX Meassure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3679487#M142874</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="684596" data-lia-user-login="SantiagoRandado" class="lia-mention lia-mention-user"&gt;SantiagoRandado&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steps:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measures:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Color =

VAR _lastDay =

    CALCULATE ( LASTDATE ( 'Table'[date] ), 'Table'[date] )

VAR _weekDay =

    WEEKDAY ( _lastDay )

VAR _firstDayInLastWeek =

    CALCULATE ( LASTDATE ( 'Table'[date] ) - _weekDay, ALL ( 'Table' ) )

VAR _lastWeek =

    IF ( SELECTEDVALUE ( 'Table'[date] ) &amp;gt;= _firstDayInLastWeek, 1 )

RETURN

    IF ( _lastWeek = 1, "light blue", "light Green" )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this does not work, could you please share some sample data without sensitive information and expected output.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;How to provide sample data in the Power BI Forum - Microsoft Fabric Community&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;to&lt;/STRONG&gt; help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to get your questions answered quickly&lt;/A&gt;&amp;nbsp;--&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;&amp;nbsp;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 07:27:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-With-DAX-Meassure/m-p/3679487#M142874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-05T07:27:23Z</dc:date>
    </item>
  </channel>
</rss>

