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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
L_G
Helper I
Helper I

Dynamic difference between two selected field parameter measures

Hi,

I need help writing a DAX measure in which I have to calculate the difference between two selected measure in a field paramenter slicer.

Do I have to create a calculation group in Tabular Editor? If yes, can you guide me on how to do it?

es. Selecting EBITDA for the current year and the EBITDA of the previous year from the filter parameter slicer, I need to have the difference between theese two selected measure.

 

L_G_0-1697532159999.png

 

L_G_1-1697532184072.png

 

I Need to have this difference measure to be dynamic, based on the selected measere in the field paramenter slicer.

 

Can anyone help me??

 

Thanks in advance,

Luca

3 REPLIES 3
klaman
Regular Visitor

I solved it by creating two measures that shows the selected value order from the field parameters: 

 

Parameter 1 = SELECTEDVALUE('Parameter1' [order])

Parameter 2 = SELECTEDVALUE('Parameter2' [order])

 

Then I created a Switch measure that looks a the above chosen values and their order: 

 

Difference = 

SWITCH(
    TRUE(),
    [Parameter1] = 6 && [Parameter2] = 0, [Selected measure for parameter 1] - [Selected measure for parameter 2],
    [Parameter1] = 5 && [Parameter2] = 1, [Selected measure for parameter 1] - [Selected measure for parameter 2]
  etc)
L_G
Helper I
Helper I

HI @some_bih 

I need to have a dinamyc measure that appears only if I select those 2 measures in the field parameter slicer.

In the field parameter slicer I have multiple measures that don't need this "Difference AC - AP" measure to be showed.

some_bih
Super User
Super User

Hi @L_G simple measure like below is ok for you?

Difference test= [EBTDA]-[EBTDAP]





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors