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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
bi_trax87
Frequent Visitor

Field Parameters with Measures, Variance Analysis

Hi,

 

I would like to know if it is possible to select a measure from a field parameter and besides changing the line chart to the selected measure values to also alter the difference chart (with the same slicer)

 

If I use the field parameter in the difference chart it would only have the absolute measure and not the YoY that should be displayed in the difference chart

 

bi_trax87_0-1721230742778.png

 

Any thoughts?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @bi_trax87 

If your measure parameters are all comparative, such as selecting both this year and last year, you may want to consider creating a measure and subtracting either this year or last year from the parameters, you can refer to the following sample.

Sample measures.

vxinruzhumsft_0-1721276100038.png

The paramater order.

vxinruzhumsft_3-1721276294929.png

Create a measure, then put the measure to the column chart visual

MEASURE =
IF (
    ISFILTERED ( Parameter[Parameter Fields] ),
    SWITCH (
        TRUE (),
        MAX ( Parameter[Parameter Order] ) IN { 0, 1 }, [TotalSales] - [TotalSalesLY],
        MAX ( Parameter[Parameter Order] ) IN { 2, 3 }, [TotalSales34] - [TotalSales34LY]
    )
)

Output

vxinruzhumsft_1-1721276216195.png

 

vxinruzhumsft_2-1721276231122.png

 

Best Regards!

Yolo Zhu

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
Anonymous
Not applicable

Hi @bi_trax87 

If your measure parameters are all comparative, such as selecting both this year and last year, you may want to consider creating a measure and subtracting either this year or last year from the parameters, you can refer to the following sample.

Sample measures.

vxinruzhumsft_0-1721276100038.png

The paramater order.

vxinruzhumsft_3-1721276294929.png

Create a measure, then put the measure to the column chart visual

MEASURE =
IF (
    ISFILTERED ( Parameter[Parameter Fields] ),
    SWITCH (
        TRUE (),
        MAX ( Parameter[Parameter Order] ) IN { 0, 1 }, [TotalSales] - [TotalSalesLY],
        MAX ( Parameter[Parameter Order] ) IN { 2, 3 }, [TotalSales34] - [TotalSales34LY]
    )
)

Output

vxinruzhumsft_1-1721276216195.png

 

vxinruzhumsft_2-1721276231122.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks a million!

 

I believe UX wise it is not ideal to select what you want in pairs (i.e. Current Year & Previous Year)

 

However in a scenario where you have Current Year vs Budget/Forecast/Target where Current year is always the same and you compare vs a field parameter this would be amazing

 

Thanks again

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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