March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Experts
is it possible to use a Measure as a slicer in a Power BI report or how to convert a measure into a slicer in a Power Bi report
My Measure.
_MeasureSelector = DATATABLE(
"Measure", STRING,
"Sort Order", INTEGER,
{
{"Actuals", 1},
{"Current Forecast", 2},
{"Budgets", 3},
{"Budgets vs Forecasts", 4},
{"YTD Actuals", 5},
{"YTD Budgets", 6},
{"YTD Variance", 7},
{"YTD Variance %", 8},
{"Selected Month Actuals", 9},
{"Selected Month Budgets", 10},
{"Selected Month Actuals vs Budgets", 11},
{"Selected Month Variance %", 12},
{"Previous Forecast for Selected Month", 13},
{"Forecast vs Selected Month Actuals", 14},
{"Full Year Forecast", 15},
{"Full Year Budget", 16},
{"Full Year Budget vs Forecast", 17},
{"Full Year Forecast Variance to Budget %", 18},
{"Run Rate", 19},
{"Forecast vs Run Rate", 20},
{"Forecast to Run Rate Variance %", 21}
}
)
Solved! Go to Solution.
Hi, @WhaleWatcher222
You need to create a calculation table
MeasureSelectorTable = DATATABLE(
"Measure", STRING,
"Sort Order", INTEGER,
{
{"Actuals", 1},
{"Current Forecast", 2},
{"Budgets", 3},
{"Budgets vs Forecasts", 4},
{"YTD Actuals", 5},
{"YTD Budgets", 6},
{"YTD Variance", 7},
{"YTD Variance %", 8},
{"Selected Month Actuals", 9},
{"Selected Month Budgets", 10},
{"Selected Month Actuals vs Budgets", 11},
{"Selected Month Variance %", 12},
{"Previous Forecast for Selected Month", 13},
{"Forecast vs Selected Month Actuals", 14},
{"Full Year Forecast", 15},
{"Full Year Budget", 16},
{"Full Year Budget vs Forecast", 17},
{"Full Year Forecast Variance to Budget %", 18},
{"Run Rate", 19},
{"Forecast vs Run Rate", 20},
{"Forecast to Run Rate Variance %", 21}
}
)
Then create a slicer.
Create a measure that uses the selected value from the slicer to determine which measure to display. Use the measure in your visuals to dynamically display the measure based on the slicer selection.
You can check the following links:
Solved: How to use a measure as slicer? - Microsoft Fabric Community
How to use a measure as Slicer? - PowerBI Talks
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, @WhaleWatcher222
You need to create a calculation table
MeasureSelectorTable = DATATABLE(
"Measure", STRING,
"Sort Order", INTEGER,
{
{"Actuals", 1},
{"Current Forecast", 2},
{"Budgets", 3},
{"Budgets vs Forecasts", 4},
{"YTD Actuals", 5},
{"YTD Budgets", 6},
{"YTD Variance", 7},
{"YTD Variance %", 8},
{"Selected Month Actuals", 9},
{"Selected Month Budgets", 10},
{"Selected Month Actuals vs Budgets", 11},
{"Selected Month Variance %", 12},
{"Previous Forecast for Selected Month", 13},
{"Forecast vs Selected Month Actuals", 14},
{"Full Year Forecast", 15},
{"Full Year Budget", 16},
{"Full Year Budget vs Forecast", 17},
{"Full Year Forecast Variance to Budget %", 18},
{"Run Rate", 19},
{"Forecast vs Run Rate", 20},
{"Forecast to Run Rate Variance %", 21}
}
)
Then create a slicer.
Create a measure that uses the selected value from the slicer to determine which measure to display. Use the measure in your visuals to dynamically display the measure based on the slicer selection.
You can check the following links:
Solved: How to use a measure as slicer? - Microsoft Fabric Community
How to use a measure as Slicer? - PowerBI Talks
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.
@WhaleWatcher222 You can use Field Parameter where you don't need to convert into calculated column. Just drag and drop measures list and use it in slicer. Refer this blog.
https://www.sqlbi.com/articles/fields-parameters-in-power-bi/
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |