Forum Discussion
Measure as a filter in a Power Bi Report
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}
}
)- Anonymous2 years ago
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.
2 Replies
- Tahreem24
Super User
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/
- AnonymousNot applicable
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.