<?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: dynamically Data from Two table using slicer in card in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3719331#M144809</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507072" data-lia-user-login="Krishna_14hcl" class="lia-mention lia-mention-user"&gt;Krishna_14hcl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a measure and replaced the data from Table1 with the data for the Table2 country, as shown in the following image&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;Here is the DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dynamic Sales =
VAR SelectedCountry =
    SELECTEDVALUE ( 'Table2'[Country], "All" )
RETURN
    IF (
        SelectedCountry = "All",
        SUMX ( 'Table1', 'Table1'[Sales1] ),
        CALCULATE ( SUM ( 'Table2'[Sales] ), 'Table2'[Country] = SelectedCountry )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create a measure to calculate the totals for Table1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dynamic Sales Total = SUMX('Table1','Table1'[Dynamic Sales])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yohua%40microsoft.com%7Ce1106bfabecb4734a5cc08dc2305bc51%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638423754744679080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=24%2BceC5sFd3n3%2FhFDYILWFcNjCwVClBD%2BPBsSLVfJGk%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yongkang Hua&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2024 08:58:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-23T08:58:25Z</dc:date>
    <item>
      <title>dynamically Data from Two table using slicer in card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717143#M144705</link>
      <description>&lt;P&gt;Dear All,&lt;BR /&gt;&lt;BR /&gt;I am very new in power BI therefore need a favour in dax, Please help me to create a Dax,&amp;nbsp;&lt;BR /&gt;I have two data sets table 1 &amp;amp; table 2 as given below. The requirement is total sales USD 2000 from table 1, but when we use slicer for counry values should be pick up from table 2. i.e Canada&amp;nbsp; 500, Russia 200 and Germany 300. Please help me to get this in a card in power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Table 1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Table 2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Country name&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;690&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;India&lt;/TD&gt;&lt;TD&gt;780&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Russia&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;340&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Russia&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;TD&gt;160&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 22 Feb 2024 12:49:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717143#M144705</guid>
      <dc:creator>Krishna_14hcl</dc:creator>
      <dc:date>2024-02-22T12:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically Data from Two table using slicer in card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717240#M144708</link>
      <description>&lt;P&gt;If the data is the same, you should combine these into 1 table. Use the append query option to do this. If the "Total Sales" is an actual row in your data, remove it.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 13:51:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717240#M144708</guid>
      <dc:creator>Syk</dc:creator>
      <dc:date>2024-02-22T13:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically Data from Two table using slicer in card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717283#M144710</link>
      <description>&lt;P&gt;Dear Syk,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;thanks for sharing your guidance, But the condition is some different, As per requirement. I need to show Total sales in a card from the&amp;nbsp; first table of country name, but when I use slicer , it should filter data&amp;nbsp; from second table like&amp;nbsp;&lt;BR /&gt;country name canada is 500 as actual value, instead of canada (340 that is some overlap sales) because in first table some data is overlapping with some criteria.&lt;BR /&gt;&lt;BR /&gt;Is it possible to show the data from other table using selectedvalue and switch like measures if yes, Please help&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 14:04:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717283#M144710</guid>
      <dc:creator>Krishna_14hcl</dc:creator>
      <dc:date>2024-02-22T14:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically Data from Two table using slicer in card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717302#M144711</link>
      <description>&lt;P&gt;Possibly.. But your data would get messy and hard to understand very quickly. Is the requirement that if there is data in table 2 for a country, you no longer need the data from table 1? If there's no data in table 2, use the data from table 1?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 14:14:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3717302#M144711</guid>
      <dc:creator>Syk</dc:creator>
      <dc:date>2024-02-22T14:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: dynamically Data from Two table using slicer in card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3719331#M144809</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507072" data-lia-user-login="Krishna_14hcl" class="lia-mention lia-mention-user"&gt;Krishna_14hcl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a measure and replaced the data from Table1 with the data for the Table2 country, as shown in the following image&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;Here is the DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dynamic Sales =
VAR SelectedCountry =
    SELECTEDVALUE ( 'Table2'[Country], "All" )
RETURN
    IF (
        SelectedCountry = "All",
        SUMX ( 'Table1', 'Table1'[Sales1] ),
        CALCULATE ( SUM ( 'Table2'[Sales] ), 'Table2'[Country] = SelectedCountry )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create a measure to calculate the totals for Table1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dynamic Sales Total = SUMX('Table1','Table1'[Dynamic Sales])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yohua%40microsoft.com%7Ce1106bfabecb4734a5cc08dc2305bc51%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638423754744679080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=24%2BceC5sFd3n3%2FhFDYILWFcNjCwVClBD%2BPBsSLVfJGk%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yongkang Hua&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 08:58:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamically-Data-from-Two-table-using-slicer-in-card/m-p/3719331#M144809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-23T08:58:25Z</dc:date>
    </item>
  </channel>
</rss>

