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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
benP
Frequent Visitor

Dynamic Price Slider

Hi all, 

 

I'm working on an energy report which shows consumption in kWh. I currently have this translated into £ using a hardcoded measure 

 

Cost = 0.148 * 'Energy Data'[Sum of Consumption]
 
This gives me a monetry value of 14.8 pence per kilowatt hour. I need to make this price dynamically adjustable via a slider ranging from 0 - 0.50p so the cost will update based on the slider input. Does anyone have any experience with something similar to this? 
 
Any advice would be greatly appreciated. 
Thanks, 
Ben 
1 ACCEPTED SOLUTION
CheenuSing
Community Champion
Community Champion

Hi @benP ,

 

Hope you have a  SlicerTable with different prices as values which is used as a slicer.

 

Let us assume the column name is Rate

 

Try the formula

 

Check = CALCULATE('Energy Data'[Sum of Consumption] * SELECTEDVALUE(SlicerTable[Rate]))
 
We take the value of SlicerTable[Rate] that is selected and use that to multiply 'Energy Data'[Sum of Consumption].
 
Cheers
 
CheenuSing
Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
CheenuSing
Community Champion
Community Champion

Hi @benP ,

 

Hope you have a  SlicerTable with different prices as values which is used as a slicer.

 

Let us assume the column name is Rate

 

Try the formula

 

Check = CALCULATE('Energy Data'[Sum of Consumption] * SELECTEDVALUE(SlicerTable[Rate]))
 
We take the value of SlicerTable[Rate] that is selected and use that to multiply 'Energy Data'[Sum of Consumption].
 
Cheers
 
CheenuSing
Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

This worked perfectly. 

 

Thank you sir

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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