<?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: Need help on displaying current week value in card but other week values are not 0 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602774#M75297</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405801" data-lia-user-login="tools12345" class="lia-mention lia-mention-user"&gt;tools12345&lt;/a&gt; , for this week this can work &lt;/P&gt;
&lt;P&gt;This Week =&lt;BR /&gt;CALCULATE(SUM('netsuite_powerbi apv_poitem_pomiles_pr'[usd_convert])+0, WEEKNUM('netsuite_powerbi apv_poitem_pomiles_pr'[TransDate])=WEEKNUM(TODAY()))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and for last week , if date is not filtered&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Week =&lt;BR /&gt;CALCULATE(SUM('netsuite_powerbi apv_poitem_pomiles_pr'[usd_convert])+0, WEEKNUM('netsuite_powerbi apv_poitem_pomiles_pr'[TransDate])=WEEKNUM(TODAY()) -1 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other wise better to have date table joined to date of your table with follwoing columns&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new columns &lt;BR /&gt;Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;BR /&gt;Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)&lt;BR /&gt;Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense) &lt;BR /&gt;OR&lt;BR /&gt;Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and measures &lt;BR /&gt;This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))&lt;BR /&gt;Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))&lt;BR /&gt;Last year Week= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Week on Week and WTD &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=pnAesWxYgJ8" target="_blank"&gt;https://www.youtube.com/watch?v=pnAesWxYgJ8&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jun 2022 05:04:54 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-06-27T05:04:54Z</dc:date>
    <item>
      <title>Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602759#M75296</link>
      <description>&lt;P&gt;Hello everyone, I really need your expertise on this one. I have been trying around and am just new to PBI and I have the below measure created:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It displayed the week value I needed on the card, but the other week values returned to 0. How can I display all the other weeks with the correct values? Any thoughts or suggestions?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ap_latest_usd = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;max_date&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAXX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'table'[WY2]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;latest_ap&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'table'[usd_convert]&lt;/SPAN&gt;&lt;SPAN&gt;)+&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'table'[WY2]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;WEEKNUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;())-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt; &lt;SPAN&gt;latest_ap&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Jun 2022 05:02:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602759#M75296</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-06-27T05:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602774#M75297</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405801" data-lia-user-login="tools12345" class="lia-mention lia-mention-user"&gt;tools12345&lt;/a&gt; , for this week this can work &lt;/P&gt;
&lt;P&gt;This Week =&lt;BR /&gt;CALCULATE(SUM('netsuite_powerbi apv_poitem_pomiles_pr'[usd_convert])+0, WEEKNUM('netsuite_powerbi apv_poitem_pomiles_pr'[TransDate])=WEEKNUM(TODAY()))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and for last week , if date is not filtered&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Week =&lt;BR /&gt;CALCULATE(SUM('netsuite_powerbi apv_poitem_pomiles_pr'[usd_convert])+0, WEEKNUM('netsuite_powerbi apv_poitem_pomiles_pr'[TransDate])=WEEKNUM(TODAY()) -1 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other wise better to have date table joined to date of your table with follwoing columns&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new columns &lt;BR /&gt;Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;BR /&gt;Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)&lt;BR /&gt;Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense) &lt;BR /&gt;OR&lt;BR /&gt;Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and measures &lt;BR /&gt;This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))&lt;BR /&gt;Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))&lt;BR /&gt;Last year Week= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Week on Week and WTD &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=pnAesWxYgJ8" target="_blank"&gt;https://www.youtube.com/watch?v=pnAesWxYgJ8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 05:04:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602774#M75297</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-27T05:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602786#M75299</link>
      <description>&lt;P&gt;Hi Sir, appreciate your thoughts and reply! Unfortunately, tried to apply the first 2 measures recommended above but got the same results, other weeks returned 0 in value. Any possible workaround we can do on the measure instead of creating another new column? Thank you so much!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 05:16:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602786#M75299</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-06-27T05:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602800#M75300</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405801" data-lia-user-login="tools12345" class="lia-mention lia-mention-user"&gt;tools12345&lt;/a&gt; , Please create them as measures, not columns. And This week based on today will only have value for the current week. You can consider This week Vs last week &lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 05:23:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602800#M75300</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-27T05:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602848#M75301</link>
      <description>&lt;P&gt;Hi Sir, yes I created them as measures, using this one provided,&amp;nbsp;but still got the other week values as 0 as image below. Thank you for the patience!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This Week =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE(SUM('netsuite_powerbi apv_poitem_pomiles_pr'[usd_convert])+0, WEEKNUM('netsuite_powerbi apv_poitem_pomiles_pr'[TransDate])=WEEKNUM(TODAY()))&lt;/SPAN&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 05:45:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2602848#M75301</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-06-27T05:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2611230#M75746</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405801" data-lia-user-login="tools12345" class="lia-mention lia-mention-user"&gt;tools12345&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;&lt;P&gt;I understand that you want all cards to show the correct value, not the "0" value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd love to be able to help you on this issue,you can try this measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR latest_ap = CALCULATE(SUM('table'[usd_convert])+0,filter(all('table'), [WY2]=WEEKNUM(TODAY())-1))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there still exists something wrong, I'll be happy that you provide me with a sample data, because it would be very helpful for me to study your problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can provide sample data by uploading a PBIX file or an Excel file.&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 &lt;STRONG&gt;Selina&lt;/STRONG&gt;&lt;STRONG&gt; zhu&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 07:17:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2611230#M75746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-30T07:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2616005#M76065</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;thank you for your insights, I appreciate it! I tried to apply the measure but what it did was copy the same value to other weeks, highlighted in the red box. I'd like to achieve the same results highlighted in the green box. Please see the below image.&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 01:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2616005#M76065</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-07-04T01:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2616908#M76102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405801" data-lia-user-login="tools12345" class="lia-mention lia-mention-user"&gt;tools12345&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR latest_ap = CALCULATE(SUM('table'[usd_convert])+0,filter('table', [WY2]=WEEKNUM(TODAY())-1))&lt;/LI-CODE&gt;&lt;P&gt;please try this to check if it works.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 09:30:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2616908#M76102</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-04T09:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on displaying current week value in card but other week values are not 0</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2627447#M76721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;thank you for the help and suggestions! Appreciate it. Unfortunately, I am still not getting the desired result I want to display. Please see image attached.&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 10:41:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-displaying-current-week-value-in-card-but-other/m-p/2627447#M76721</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-07-08T10:41:16Z</dc:date>
    </item>
  </channel>
</rss>

