Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply

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}
    }
)
1 ACCEPTED SOLUTION
v-yohua-msft
Community Support
Community Support

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}
    }
)

vyohuamsft_1-1730104771162.png

 

Then create a slicer.

vyohuamsft_0-1730104671785.png

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:

vyohuamsft_2-1730104896166.png

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.

View solution in original post

2 REPLIES 2
v-yohua-msft
Community Support
Community Support

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}
    }
)

vyohuamsft_1-1730104771162.png

 

Then create a slicer.

vyohuamsft_0-1730104671785.png

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:

vyohuamsft_2-1730104896166.png

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.

Tahreem24
Super User
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/

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric Community.