This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi
My matrix is showing a country's exports and it has calendar years in the columns and export products in the rows. I can use export dollar values and volumes (in tonnes) as the Matrix Values but want to use slicer which will allow me show either the dollar values or the tonnes but not the both. Is it possible to create such a slicer/filter?
Solved! Go to Solution.
Hi @M-Sayeed -Yes, it is possible to create a slicer in Power BI that allows you to toggle between two measures, such as export dollar values and volumes in tonnes, and display only one in your matrix.
You can do this by creating a "Measure Selector" with a disconnected table and some DAX logic.
Create a new table with the names of the two options you'd like to toggle between (e.g., "Dollar Values" and "Tonnes").
You could name this table something like Measure Selector.
Go to Modeling > New Measure and create a measure that uses SWITCH and SELECTEDVALUE to toggle between the dollar values and tonnes
Selected Measure =
SWITCH(
SELECTEDVALUE('Measure Selector'[Measure]),
"Dollar Values", SUM('ExportData'[Dollar Values]),
"Tonnes", SUM('ExportData'[Tonnes])
)
Drag the Measure field from the Measure Selector table to the slicer.This will allow users to toggle between "Dollar Values" and "Tonnes".
hope this helps
Proud to be a Super User! | |
Hi, @M-Sayeed
Based on your information, I create a sample table:
Then create a new table:
SlicerTable = DATATABLE(
"Option", STRING,
{
{"Dollar Values"},
{"Volumes"}
}
)
Create a new measure, and put the Option column in slicer view. Put measure in matrix visual:
SelectedValue =
SWITCH(
SELECTEDVALUE('SlicerTable'[Option]),
"Dollar Values", SUM('Table'[DollarValue]),
"Volumes", SUM('Table'[Volume (Tonnes)])
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @M-Sayeed
Based on your information, I create a sample table:
Then create a new table:
SlicerTable = DATATABLE(
"Option", STRING,
{
{"Dollar Values"},
{"Volumes"}
}
)
Create a new measure, and put the Option column in slicer view. Put measure in matrix visual:
SelectedValue =
SWITCH(
SELECTEDVALUE('SlicerTable'[Option]),
"Dollar Values", SUM('Table'[DollarValue]),
"Volumes", SUM('Table'[Volume (Tonnes)])
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It worked for me perfectly. Thanks a lot, mate.
Hi @M-Sayeed -Yes, it is possible to create a slicer in Power BI that allows you to toggle between two measures, such as export dollar values and volumes in tonnes, and display only one in your matrix.
You can do this by creating a "Measure Selector" with a disconnected table and some DAX logic.
Create a new table with the names of the two options you'd like to toggle between (e.g., "Dollar Values" and "Tonnes").
You could name this table something like Measure Selector.
Go to Modeling > New Measure and create a measure that uses SWITCH and SELECTEDVALUE to toggle between the dollar values and tonnes
Selected Measure =
SWITCH(
SELECTEDVALUE('Measure Selector'[Measure]),
"Dollar Values", SUM('ExportData'[Dollar Values]),
"Tonnes", SUM('ExportData'[Tonnes])
)
Drag the Measure field from the Measure Selector table to the slicer.This will allow users to toggle between "Dollar Values" and "Tonnes".
hope this helps
Proud to be a Super User! | |
Very helpful. Thanks a lot, mate.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 40 | |
| 21 | |
| 19 |