<?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: Trendline of the values selected and also of the totals in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3667637#M142208</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here comes 2 solutions:&lt;BR /&gt;I create a set of sample,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The first one:&lt;BR /&gt;Create a new table with&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = {"A","B","Total"}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then create a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;A&amp;amp;B = 
	VAR _uservalue = SELECTEDVALUE('Table 2'[Value])
//get the value from the table 2
	VAR _currentDate = MAX('Table'[date])
	RETURN
		SWITCH(
			_uservalue,
			"A", CALCULATE(
				MAX('Table'[value]),
				FILTER(
					ALLSELECTED('Table'),
					'Table'[user] = "AA" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
				)
			),
			"B", CALCULATE(
				MAX('Table'[value]),
				FILTER(
					ALLSELECTED('Table'),
					'Table'[user] = "BB" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
				)
			),
			"Total", CALCULATE(
				SUM('Table'[value]),
				FILTER(
					ALL('Table'),
					'Table'[date] = _currentDate
				)
			)
		)&lt;/LI-CODE&gt;
&lt;P&gt;Then create a line chart and a slicer:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The result is as follow:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then the second one:&lt;BR /&gt;I create 3 measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AAA = 
	VAR _currentDate = MAX('Table'[date])
	RETURN
		CALCULATE(
			MAX('Table'[value]),
			FILTER(
				ALLSELECTED('Table'),
				'Table'[user] = "AA" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
			)
		)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;BBB = 
	VAR _currentDate = MAX('Table'[date])
	RETURN
		CALCULATE(
			MAX('Table'[value]),
			FILTER(
				ALLSELECTED('Table'),
				'Table'[user] = "BB" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
			)
		)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Total = 
	VAR _currentDate = MAX('Table'[date])
	RETURN
		CALCULATE(
			SUM('Table'[value]),
			FILTER(
				ALL('Table'),
				'Table'[date] = _currentDate
			)
		)&lt;/LI-CODE&gt;
&lt;P&gt;Then create a matrix and a slicer:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The result is as follow:&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;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&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>Tue, 30 Jan 2024 07:08:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-01-30T07:08:27Z</dc:date>
    <item>
      <title>Trendline of the values selected and also of the totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3666246#M142124</link>
      <description>&lt;P&gt;I am having a slicer with values "A" and "B". I am trying to create a monthwise line chart where if A is selected I want the total_sales of A and overall sales (sum of sales of A and B) as two different lines. If B&amp;nbsp;is selected I want the total_sales of B and overall sales (sum of sales of A and B) as two different lines. If nothing is selected, i want total_sales of A, total_sales of B and overall sales (Total 3 lines). I am having the following measure which calculate total_sales&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var _A=
CALCULATE([MTD Total Production],
          ALL('dim date'),
          DATESINPERIOD('last Date'[Date],MAX('dim date'[Date]),-6,MONTH),
          USERELATIONSHIP('dim date'[Key],'last Date'[Key]))&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;for ref: This is the graph for total_sales of A and B when nothing is selected. There is no overall sales line in the graph.&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;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 13:30:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3666246#M142124</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-29T13:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Trendline of the values selected and also of the totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3666348#M142136</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Based on your description, it seems like you're trying to create a Power BI measure that calculates total sales based on the selection from a slicer. Below is a measure that you can use to achieve this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Total Sales =&lt;BR /&gt;VAR SelectedValue =&lt;BR /&gt;SELECTEDVALUE('YourSlicer'[Value])&lt;BR /&gt;RETURN&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;ISINSCOPE('YourSlicer'[Value]),&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[MTD Total Production],&lt;BR /&gt;ALL('dim date'),&lt;BR /&gt;DATESINPERIOD('last Date'[Date], MAX('dim date'[Date]), -6, MONTH),&lt;BR /&gt;USERELATIONSHIP('dim date'[Key], 'last Date'[Key]),&lt;BR /&gt;'YourTable'[Value] = SelectedValue&lt;BR /&gt;),&lt;BR /&gt;SELECTEDVALUE('YourSlicer'[Value]) = BLANK(),&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[MTD Total Production],&lt;BR /&gt;ALL('dim date'),&lt;BR /&gt;DATESINPERIOD('last Date'[Date], MAX('dim date'[Date]), -6, MONTH),&lt;BR /&gt;USERELATIONSHIP('dim date'[Key], 'last Date'[Key])&lt;BR /&gt;),&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[MTD Total Production],&lt;BR /&gt;ALL('dim date'),&lt;BR /&gt;DATESINPERIOD('last Date'[Date], MAX('dim date'[Date]), -6, MONTH),&lt;BR /&gt;USERELATIONSHIP('dim date'[Key], 'last Date'[Key])&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replace 'YourSlicer', 'dim date', 'last Date', and 'YourTable' with your actual table names. This measure calculates total sales based on the selection from the slicer.&lt;/P&gt;&lt;P&gt;In your line chart, you can use this measure as the value and use the slicer selection to control what gets displayed in the chart. You'll need to add appropriate visuals and filters based on your data model and requirements. This measure should help you achieve the desired functionality where you can dynamically show total sales of A, total sales of B, and overall sales based on slicer selections.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 14:15:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3666348#M142136</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-01-29T14:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trendline of the values selected and also of the totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3666751#M142163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for the response. But I need total_sales of A and overall sales (sales of A+B) when A is selected (2 trendlines when A is selected) and total_sales of B and overall sales (sales of A+B) when B is selected (2 trendlines when B is selected). Moreover, the DAX you provided only gives overall sales when nothing is selected, but I want the trendline of A, B and overall sales when nothing is selected.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 18:17:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3666751#M142163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-29T18:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trendline of the values selected and also of the totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3667447#M142194</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for the clarification. To achieve the desired behavior, you can adjust the measures as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Sales of A =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[MTD Total Production],&lt;BR /&gt;'YourTable'[Value] = "A"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;Total Sales of B =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[MTD Total Production],&lt;BR /&gt;'YourTable'[Value] = "B"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;Overall Sales =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[MTD Total Production],&lt;BR /&gt;ALL('YourTable')&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;Overall Sales of A =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[MTD Total Production],&lt;BR /&gt;'YourTable'[Value] IN { "A", "B" }&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, when nothing is selected, Overall Sales will represent the sales of both A and B, while Overall Sales of A will represent the sales of A+B, which is the same as Overall Sales.&lt;/P&gt;&lt;P&gt;For the line chart:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When "A" is selected in the slicer, you'll display Total Sales of A and Overall Sales of A.&lt;/LI&gt;&lt;LI&gt;When "B" is selected, you'll display Total Sales of B and Overall Sales.&lt;/LI&gt;&lt;LI&gt;When nothing is selected, you'll display Total Sales of A, Total Sales of B, and Overall Sales.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Adjust your slicer to choose the appropriate measures based on the selection. This setup should give you the desired trendlines for A, B, and overall sales based on the slicer selection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 05:16:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3667447#M142194</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-01-30T05:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trendline of the values selected and also of the totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3667449#M142195</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used Adventureworks database to simulate your use case. I have InternetSales and ProductCategory(kept only 2 products).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create three measures, for total, A and B. In my case I have created for Total, Bikes and Accessories. Created a slicer for ProductCategory. I have not used any date filtering, you can add it to CALCULATE. Add all three measures to line char y-axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MTotalSales =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[MSalesAmount]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MSalesAmountBikes =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_checkFilter&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;HASONEFILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&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;_selectedValue&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;( (&lt;/SPAN&gt;&lt;SPAN&gt;_checkFilter&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;_selectedValue&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Bikes"&lt;/SPAN&gt;&lt;SPAN&gt;) || &lt;/SPAN&gt;&lt;SPAN&gt;NOT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_checkFilter&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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;FactInternetSales&lt;/SPAN&gt;&lt;SPAN&gt;[SalesAmount]&lt;/SPAN&gt;&lt;SPAN&gt;) , &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Bikes"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MSalesAccessories =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_checkFilter&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;HASONEFILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&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;_selectedValue&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;( (&lt;/SPAN&gt;&lt;SPAN&gt;_checkFilter&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;_selectedValue&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Accessories"&lt;/SPAN&gt;&lt;SPAN&gt;) || &lt;/SPAN&gt;&lt;SPAN&gt;NOT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_checkFilter&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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;FactInternetSales&lt;/SPAN&gt;&lt;SPAN&gt;[SalesAmount]&lt;/SPAN&gt;&lt;SPAN&gt;) , &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;DimProductCategory&lt;/SPAN&gt;&lt;SPAN&gt;[EnglishProductCategoryName]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Accessories"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&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;P&gt;If this doesn't solve your problem, please share pbix file with sensitive data removed or mocked up data.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 05:17:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3667449#M142195</guid>
      <dc:creator>talespin</dc:creator>
      <dc:date>2024-01-30T05:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trendline of the values selected and also of the totals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3667637#M142208</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here comes 2 solutions:&lt;BR /&gt;I create a set of sample,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The first one:&lt;BR /&gt;Create a new table with&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = {"A","B","Total"}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then create a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;A&amp;amp;B = 
	VAR _uservalue = SELECTEDVALUE('Table 2'[Value])
//get the value from the table 2
	VAR _currentDate = MAX('Table'[date])
	RETURN
		SWITCH(
			_uservalue,
			"A", CALCULATE(
				MAX('Table'[value]),
				FILTER(
					ALLSELECTED('Table'),
					'Table'[user] = "AA" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
				)
			),
			"B", CALCULATE(
				MAX('Table'[value]),
				FILTER(
					ALLSELECTED('Table'),
					'Table'[user] = "BB" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
				)
			),
			"Total", CALCULATE(
				SUM('Table'[value]),
				FILTER(
					ALL('Table'),
					'Table'[date] = _currentDate
				)
			)
		)&lt;/LI-CODE&gt;
&lt;P&gt;Then create a line chart and a slicer:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The result is as follow:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then the second one:&lt;BR /&gt;I create 3 measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AAA = 
	VAR _currentDate = MAX('Table'[date])
	RETURN
		CALCULATE(
			MAX('Table'[value]),
			FILTER(
				ALLSELECTED('Table'),
				'Table'[user] = "AA" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
			)
		)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;BBB = 
	VAR _currentDate = MAX('Table'[date])
	RETURN
		CALCULATE(
			MAX('Table'[value]),
			FILTER(
				ALLSELECTED('Table'),
				'Table'[user] = "BB" &amp;amp;&amp;amp; 'Table'[date] = _currentDate
			)
		)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Total = 
	VAR _currentDate = MAX('Table'[date])
	RETURN
		CALCULATE(
			SUM('Table'[value]),
			FILTER(
				ALL('Table'),
				'Table'[date] = _currentDate
			)
		)&lt;/LI-CODE&gt;
&lt;P&gt;Then create a matrix and a slicer:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The result is as follow:&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;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&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>Tue, 30 Jan 2024 07:08:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trendline-of-the-values-selected-and-also-of-the-totals/m-p/3667637#M142208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-30T07:08:27Z</dc:date>
    </item>
  </channel>
</rss>

