cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Combining 2 slicers data in a single line graph

Hello,

 

I'm trying to implement this for the last 2 days, without any luck with any the solutions found in this community.

 

I have two slicers with a sub-set of data from the same column (different types). I want to choose multiple from each slicer to be able to show this measure on a line graph for each of the chosen ones. 

 

Measure: 

FundReturn100 =
VAR Fundbase =
CALCULATE (
SUM ( AssetReturns[price] );
FILTER (
ALLSELECTED ( AssetReturns[assetdate] );
AssetReturns[assetdate]
= CALCULATE ( MIN ( AssetReturns[assetdate] ); ( ALLSELECTED ( AssetReturns ) ) )
)
)
RETURN
CALCULATE ( SUM ( AssetReturns[price] ) ) / Fundbase
* 100

 

Currently, I am able to choose multiple for both slicers, but once I choose the first from the other slicer everything disappears from the graph.

 

Thank you in advance for your help.

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may refer to the following post.

https://community.powerbi.com/t5/Desktop/Plot-difference-between-two-rows-based-on-slicer-selection/m-p/712313#M343871

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may refer to the following post.

https://community.powerbi.com/t5/Desktop/Plot-difference-between-two-rows-based-on-slicer-selection/m-p/712313#M343871

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Can you describe the problem? It is not very clear with formula.

But In case you want one with time and one without time. Then let sum for data come using the slicer on the page(if there is one) and user except to avoid date filter to get GT

Anonymous
Not applicable

Thanks for the quick reply 🙂 And sorry for not being clear enough, but I am totally on PowerBI. 

I will try to clarify it:

- 1st slicer has the type 1 list of products; (slicing by name)

- 2nd slicer has the type 2 list of products: (slicing by name)

- The graph has the value calculated by the formula; (correctly showing the result when only one of the slicer has selections)

 

The idea is to give the user the possibility to compare N to N products of the different types in the graph.

 

I hope it was more clear 🙂

 

 

 

 

Anonymous
Not applicable

Maybe sharing the pbix file is easy to understand what I need to show on the graph.

PBIX

 

Best,

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors