cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

Hello, I need to add total Line in line Chart, this nes total line dont change if filter country is selected. Thanks for your support.

1 ACCEPTED SOLUTION
Community Support

Hi  @Alexo3627 ,

Thanks @AUDISU  for sharing, I also have a method here:

Here are the steps you can follow：

1. Create calculated table.

``````Table 2 =
var _table1=
DISTINCT('Table'[Country])
var _table2=
{"Total"}
return
UNION(
_table1,_table2)``````

2. Create measure.

``````Measure =
IF(
MAX('Table 2'[Country]) = "Total",SUMX(FILTER(ALL('Table'),'Table'[Date]=MAX('Table'[Date])),'Table'[TotalSales]),SUMX(FILTER('Table','Table'[Country]=MAX('Table 2'[Country])&&'Table'[Date]=MAX('Table'[Date])),[TotalSales]))``````

3. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 REPLIES 2
Community Support

Hi  @Alexo3627 ,

Thanks @AUDISU  for sharing, I also have a method here:

Here are the steps you can follow：

1. Create calculated table.

``````Table 2 =
var _table1=
DISTINCT('Table'[Country])
var _table2=
{"Total"}
return
UNION(
_table1,_table2)``````

2. Create measure.

``````Measure =
IF(
MAX('Table 2'[Country]) = "Total",SUMX(FILTER(ALL('Table'),'Table'[Date]=MAX('Table'[Date])),'Table'[TotalSales]),SUMX(FILTER('Table','Table'[Country]=MAX('Table 2'[Country])&&'Table'[Date]=MAX('Table'[Date])),[TotalSales]))``````

3. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Resolver III

Hi @Alexo3627 ,

Create a mesure removing country filter then add it to line chat.
Use following mesure and change table and column names as your data model.

Total Sales (No Country Filter) = CALCULATE(SUM('Sales'[SalesAmount]), ALL('Sales'[Country]))

Thanks

DISU

Announcements

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.