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
MrWLJ71
Helper I
Helper I

Filter value totals based on slider or option selections

Firstly I must point out I am an absolute newbie when it comes to Power BI, so please be patient!

I am so new in fact I hardly know how to ask the question for what it is I am wanting to achieve, so let me try and explain.

I have a table with a lot of columns in it, but the significant columns are as follows:

Replacement Year - a range of dates for when I need to change an item

Replacement Cost - a range of values showing how much something costs to replace

Importance Rank - Range from 1 - 27 based on lots of things but 27 is the most important and 1 is the least.

 

My question/need is this :

Is there a way for me to set a budget amount that will then filter my data and only show the items I can afford, based on their importance rank and replacement year?

 

Ideally, I would like a slider (or parameter entry box?) that will allow me to choose the maximum spend I can afford compared to the total replacement budget, then have a table to display the items, ranked 27-1, and considering the year I need to replace it.

 

For example, let's say I look ahead at the next 5 years and I need to spend my budget based on the importance rank (27 first then descending) and also the year it needs replacing.

 

Is this possible?

 

Thank you in advance, I would be extremely grateful for any pointers or guides. 

1 ACCEPTED SOLUTION
aj1973
Community Champion
Community Champion

Here you go

aj1973_0-1628530616933.png

as you can see the totals looks accurate now

https://drive.google.com/file/d/1HFjeutnPMAhojiQ6sM7gg2DOuSnJd40i/view?usp=sharing

 

Don't know the private message is not functioning

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

32 REPLIES 32

As ever amine, thank you

Now we are closer than ever!

I can see we have the running total and that is good, thank you.

When I sort by the Rank though the running total is obviously now not in the right order as it is based on the idLCAM column.

I changed idLCAM to STRATrank (twice) in the last line of code but I the get a blank display in the table. Is this because there are duplicates in the STRATrank column? (Remember 27 is high priority and the starting point and 1 is low)

It feels like there has to be a unique ranking measure based on firstly the STRATrank and then say the idLCAM... which we can then use in the last line of the code?

Is that possible?

 

Nearly there!

aj1973
Community Champion
Community Champion

The answer is simply no, the same measure can't change dynamically when you change the field filter. However you can add a new measure to the table

aj1973_0-1628167627879.png

And I would recommend that you create a new page with the new measure and new parameter, it would make more sens

here is the formula

Est Replace Cost running total in StartRank =
CALCULATE(
    SUM('tblLCAM'[Est Replace Cost]),
    FILTER(ALL(tblLCAM),
        ISONORAFTER('tblLCAM'[STRATrank], MAX('tblLCAM'[STRATrank]), DESC)
    )
)
 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi Amine

I really dont follow that. I created a new page as you suggested. The table is not displaying what I expected.

 

Thank you again Amine. I have used your guidance to create the table correctly as per what I needed in the first instance, so thank you very much. 

 

Before I mark the solution, knowing that I cannot have a dynamic table in the way I would like, what code do I need to enter into the measure (as a new measure) for each site, so I can replicate the table on a separate page per site?

 

Thank you

aj1973
Community Champion
Community Champion

Here you go

aj1973_0-1628530616933.png

as you can see the totals looks accurate now

https://drive.google.com/file/d/1HFjeutnPMAhojiQ6sM7gg2DOuSnJd40i/view?usp=sharing

 

Don't know the private message is not functioning

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Amine

Thank you, from the bottom of my heart I truly appreciate a) your time, b)your effort, c)your patience and d)your kindness in assisting me with this! We got there !!!

 

I have marked this as resolved.

 

I am very grateful

aj1973
Community Champion
Community Champion

Welcome

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

aj1973
Community Champion
Community Champion

Private

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi Armine. Thank you for this. I am travelling at the moment and haven't had chance to look at it. I wanted you to know I am not ignoring your response, sorry!

aj1973
Community Champion
Community Champion

Indeed, I did count those 2000 words lol.

 

Ok I ll work on it. 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi there

Thank you once again for taking the time to respond. 

The slider, which shows the budget amount is good, but it does not filter the table to only include the top ranking items which are <= the slider selection.

 

I thought about this a little more last night and perhaps I could attempt to explain another way.

Imagine you have some work which is necessary on your car. There table is a list of items you need or want to do. 

There are some items which MUST be done, such as new brakes and tyres etc and other things are NICE to have, such as new car mats or an air freshener for example.

IF the whole list added up to $1,000 but I only have $500 then I set the slider (budget amount) to 500$ and the table will start at the highest ranking item first and working down the list until my 500$ is spent, anything beyond that value will not be displayed in the table.

 

I hope that explains my output desire a little better?

 

Thank you once again, much appreciated.

aj1973
Community Champion
Community Champion

Hi @MrWLJ71 

Welcome to the world of Power bi, thus you should start here

How to Get Your Question Answered Quickly - Microsoft Power BI Community

aj1973_0-1626361504703.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

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.