cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper V

## Field Parameters Difference Total

Hi All, just asking for help on how can I create a Total but instead of sum it should be difference of the two selected measure in the Field Parameters. See below and attached sample PBI file on how it looks like:

Thank you so much for the help!

1 ACCEPTED SOLUTION
Super User

@krixtsup3r
You need to hide the non total [Difference] column(s) manually.

6 REPLIES 6
Super User

Hi, not sure if this is possible, the top most what i could achieve is something like that

you just create a switch measure =

SwitchMeasure = SWITCH(min('Right Table'[Right Table Order]),
0, [2 Revenue],
1, [2 Cost],
2, [2 Gross])
Every  measure with 1 you have to remake like this:
1 Cost = if(isfiltered(test_data[Month]), SUM(test_data[Cost]), SUM(test_data[Cost])-[SwitchMeasure])
Every Measure with 2.
if(isfiltered(test_data[Month]), SUM(test_data[Revenue]))

Afterwards depending on your data may be you can play how to hide that column in the end.

PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Helper V

Super User

Hi @krixtsup3r
Please refer to attached sample file with the proposed solution.

Helper V

Thank you @tamerj1!

Also, what if I selected more than 2 months in it? What it should do actually is add the 3 months for both parameters and then do the difference.

The output should be like this:

Super User

@krixtsup3r
You need to hide the non total [Difference] column(s) manually.

Helper V

Awesome this works! Thank you!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.