Forum Discussion
Dynamic Target Line with bar chart
- 6 years ago
AlinaJa Maybe you could post photo or sample pbix? I don't understand what isn't working.
That is what I get when I use your sample data, with Target[Location] in the slicer, and Target[Location] in the column series of the chart (though maybe not needed).
If no location is selected, the target will add up to sum of all locations, but when location is selected it behaves as expected.
Is that what you're looking for?
AlinaJa , you can use analytics pane
https://docs.microsoft.com/en-us/power-bi/desktop-analytics-pane
or you can create an avg measure with all or allselected and use line clustered visual
- AlinaJa6 years agoHelper I
Thank you for you quick response. amitchandak
I am quite new to the Power Bi topic.
What exactly do you mean by an avg measure with all or allselected? Could you give me an example how a measure like this could look like?
- amitchandak6 years agoSuper User
AlinaJa , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Example
CALCULATE(Average(Sales[Sales Amount]),all(Sales))
CALCULATE(Average(Sales[Sales Amount]),allselected(Sales))
- AlinaJa6 years agoHelper I
Month Location Inventory 1 Germany 1000 1 US 2000 1 China 2000 2 Germany 1500 2 US 1000 2 China 1000 3 Germany 1300 3 US 2500 3 China 2000 Location Target Germany 1000 US 1500 China 1500 I made up some sample data to simplyfy it. amitchandak