Power BI — show and hide measures on slicer

In some cases you want to see all measures on your visualizations. In some instances you want to manipulate a visibility of your calculations. Today I tell you how you can show or hide measures depending on your needs.
The first step is to create standard measures:
The next step, we need to create a table containing names of the measures. This table (column) is used to integrate values into a slicer. And to establish a column values on visualizations.
Moving forward we have to create the measure, which is responsible for showing or hiding selected measures.
Once we have everything ready. We can create visualizations: a matrix and a line chart.

Put a chosen category label into the rows (matrix) and axis (line chart) section.
Locate a [Measure name] column from the previously created the [Sales select measure] table, place into the columns (matrix) and columns (line chart) section.
Insert the [Select measure] measure into the values field (in both cases).
A matrix setup:

A line chart settings:

And here is a demo.
