Create a inline table with two fields for example.
Load * inline [
Use this field as filter.
Then in chart expression use the "Conditional" option, where you can write the logic to show the Sum(Sales) when Sales is selected in Expression field and so on.
Hope the logic is clear.