Forum Discussion
Anonymous
2 years agoNot applicable
Add total in line chart
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.
- Anonymous2 years ago
Hi Anonymous ,
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
AUDISU
2 years agoResolver III
Hi Anonymous ,
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
mmm286b
1 year agoHelper I
I'm trying with measure but I can only see one Line. 😕