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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TheCAKurtle
Helper I
Helper I

Dynamic Budgeting Tool

I am currently trying to build a dynamic budgeting tool for an energy company. With oil prices being so low currently this company would like to have the ability to "turn off" a well to help determine what is economic and what is not. So if a well is selected in a slicer I would like to set its value to zero while keeping the others the same. Is it possible to do that through a measure? 

 

Thank you in advanvce! 

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @TheCAKurtle

 

1. Create a slicer table,put the categories in the column:

Annotation 2020-04-15 121349.png

 

2.Delete the relationship between table and the slicer table:

Annotation 2020-04-15 121456.png

 

3.Create a measure as below:

 

Measure = IF(SELECTEDVALUE('slicer table'[category])=SELECTEDVALUE('Table'[Category]),0,'Table'[Ratio])

 

Finally you will see:

Annotation 2020-04-15 121606.png

 

Is the above what you need?

 

Here is my sample .pbix file you can refer to.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

6 REPLIES 6
v-kelly-msft
Community Support
Community Support

Hi @TheCAKurtle

 

1. Create a slicer table,put the categories in the column:

Annotation 2020-04-15 121349.png

 

2.Delete the relationship between table and the slicer table:

Annotation 2020-04-15 121456.png

 

3.Create a measure as below:

 

Measure = IF(SELECTEDVALUE('slicer table'[category])=SELECTEDVALUE('Table'[Category]),0,'Table'[Ratio])

 

Finally you will see:

Annotation 2020-04-15 121606.png

 

Is the above what you need?

 

Here is my sample .pbix file you can refer to.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

@v-kelly-msft 

 

That worked. Thank you!

amitchandak
Super User
Super User

@TheCAKurtle 

Not sure I got, But What if, Measure slicer or Bookmark can help

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

Yes.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

It is really tough to say without seeing the data but maybe something along the lines of:

Measure =
  VAR __Selected = 'Table'
  VAR __UnSelected = EXCEPT(ALL('Table'),__Selected)
RETURN
  SUMX(__UnSelected,[Column])

So basically, you grab everybody in context within the slicer (__Selected). You then get everyone (ALL) and then filter out __Selected using EXCEPT. Then you just SUMX across __UnSelected for some Column. And you have effectively wiped out any impact from the "selected" wells, in effect, setting their values to zero.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

 

Thanks for the quick reply. I am using this calculation to feed into several others so from this I get a ratio for how much production a particular well contributes which is then used to allocate costs. When a wells production goes to 0 I would like those ratios to be recalculated so that costs can be reallocated. I don't think this solution will work for that... Or am I mistaken?

I have no idea if it will work or not because I have zero sense of the data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.