<?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: How to set value in card based on week value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2632249#M77038</link>
    <description>&lt;P&gt;Thank you very much, sir&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏🏻&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 01:05:43 GMT</pubDate>
    <dc:creator>tools12345</dc:creator>
    <dc:date>2022-07-12T01:05:43Z</dc:date>
    <item>
      <title>How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630368#M76922</link>
      <description>&lt;P&gt;Hi everyone here in the community, we would like to ask for your insights and help, we have a specific card and a slicer with week. One requirement is that we should be able to display the current week amount on the card and once we select a week on the slicer, It will also display the week amount accordingly. Tried to create a measure but it shows the amount based on the maximum or last week on the table, and not on the current week. Below image and attach is the sample pbix file for testing. Thank you!!&amp;nbsp;&lt;A title="sample file" href="https://migo-my.sharepoint.com/:u:/g/personal/globalcorp-it_migo_io/Ec5BoeymRJNOlaSnGoICVkQBohIkEwak_wiP2PrPtijTsg?e=KCiXWk" target="_self"&gt;sample file&lt;/A&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 08:55:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630368#M76922</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-07-11T08:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630488#M76928</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I fully understood the data model, but please try to write the below measure and put it into the card visualization.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&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;LI-CODE lang="markup"&gt;expected outcome: =
VAR _thisweeknumber =
    WEEKNUM ( TODAY (), 21 )
RETURN
    IF (
        ISFILTERED ( date_2022[Week of Year] ),
        SUM ( data1[Account Payables] ),
        CALCULATE (
            SUM ( data1[Account Payables] ),
            FILTER ( data1, data1[Week] = _thisweeknumber )
        )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Jul 2022 09:32:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630488#M76928</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-07-11T09:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630498#M76929</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;BR /&gt;Here is th sample file with the solution&amp;nbsp;&lt;A href="https://we.tl/t-NAIGSrO6ds" target="_blank" rel="noopener"&gt;https://we.tl/t-NAIGSrO6ds&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Selected Week Value = 
VAR SelectedWeek = COALESCE ( SELECTEDVALUE ( data1[Week] ), WEEKNUM ( TODAY ( ) ) - 1 )
VAR Result =
    CALCULATE ( 
        SUM ( data1[Account Payables] ),
        data1[Week] = SelectedWeek
    )
RETURN
    COALESCE ( Result, 0 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 10:49:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630498#M76929</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-11T10:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630632#M76937</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;thank you so much! The measure works fine! How can I change the BLANK to 0 value for weeks that don't have an amount instead?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 10:09:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630632#M76937</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-07-11T10:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630637#M76939</link>
      <description>&lt;P&gt;Thank you so much, Sir&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;-- truly thankful and you've been one of the active pro I can reach out here in the community 🙇🏻‍&lt;span class="lia-unicode-emoji" title=":female_sign:"&gt;♀️&lt;/span&gt;&amp;nbsp;The measure works fine! How can I change the BLANK to 0 value for weeks that don't have an amount instead? Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 10:10:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630637#M76939</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-07-11T10:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630724#M76944</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;BR /&gt;The original reply has been updated as per your requirement.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 10:50:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630724#M76944</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-11T10:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630786#M76946</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you very much for your message.&lt;/P&gt;
&lt;P&gt;Please try the below measure for replacing Blank with zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;expected outcome: = 
VAR _thisweeknumber =
    WEEKNUM ( TODAY (), 21 )
RETURN
    IF (
        ISFILTERED ( date_2022[Week of Year] ),
        SUM ( data1[Account Payables] ),
        CALCULATE (
            SUM ( data1[Account Payables] ),
            FILTER ( data1, data1[Week] = _thisweeknumber )
        )
    ) + 0&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Jul 2022 11:11:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2630786#M76946</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-07-11T11:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2632249#M77038</link>
      <description>&lt;P&gt;Thank you very much, sir&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏🏻&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 01:05:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2632249#M77038</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-07-12T01:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to set value in card based on week value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2632252#M77039</link>
      <description>&lt;P&gt;Thank you very much, sir&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;- really appreciate your help and insights! 🙇🏻‍&lt;span class="lia-unicode-emoji" title=":female_sign:"&gt;♀️&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏🏻&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 01:06:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-set-value-in-card-based-on-week-value/m-p/2632252#M77039</guid>
      <dc:creator>tools12345</dc:creator>
      <dc:date>2022-07-12T01:06:23Z</dc:date>
    </item>
  </channel>
</rss>

