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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Create a slicer (slider) or text box for user to calculate the replacement cost

I am trying to create a report for Computer Replacement Cost, I looking for ways to design my page.

 

Let me explain what I am trying to achieve, I need a text box or slicers to let the user choose the number of years of the computer and approx. cost, to get an estimate for the replacement.

 

I have this same report for SSRS, I am trying to replicate it on Power BI (SSRS report in the link), I am trying to use hardcoded values but, also ok to use dynamic values (allow the user to input values through slicers or text boxes)

 

I need help with the DAX queries to achieve this or is there a better way to the same. 

In the SSRS report, I have used case statements in the query, but since I am using the Import option on Power BI, I need other ways like measures to do it.

 

I appreciate your help. Regards,

Leonard

 

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try to use SWITCH or IF.

If the problem persists,could you please share sample pbix and the result you expect?

Please mask any sensitive data before uploading.

 

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

Anonymous
Not applicable

image.png

 

In the above image is the query that I've used for the SSRS reports, If you notice I've used variables to create report parameters. I trying to do the same with Power BI with measures.

 

Again, sample data as text would help tremendously.

 

The equivalent of CASE is SWITCH in DAX. Use a SWITCH(TRUE()...) statement. The equivalent of DATEDIFF is DATEDIFF in DAX.

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

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

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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