Forum Discussion

Victormar's avatar
Victormar
Icon for Helper V rankHelper V
4 years ago
Solved

One visualization affected by the filter in another one

Hi community,

 

I would like to ask for help because I have a table where we calculate different measures based on the value mileage, and all this measures and columns are affected by a filter called "Is latest", that is part of the source table; That basically means that everytime the table is refreshed, it will add a '1' in the 'Is Latest' column to point to the last value, and the rest of the values will be blank.

That said, the table has the filter "Is Latest =1" and if I remove the filter on the table, it wouldn't do the calculations correctly.

 

I guess a saloution would be to calculate all the columns and measures with the filter in them, instead of adding the filter to the visualizatioon, but I owuld like to avoid this option as the report is half finished. 

 

So my idea was to visualize the value mileage over time on a line chart, but of course when I select a vehicle from the table, it will only show the Latest value in the line chart, I tried creating a new measure avoiding the filter to add to the line chart, but didn't work. Based on the table, the user can select a specific vehicle and hopefully see the data regarding the mileage on the line chart.

 

Hope it makes sense, as I cannot share data because it is protected, don't hesitate to ask any question you might have.

 

Any kind of help would be much appreciated. Cheers!

  • Hi Victormar ,

     

    To what I can understand what you want is that a specific visualization overwrites the filter of the Is Latest = 1 and then you can plot your line chart is this correct?

     

    If this is the case you need to use a REMOVEFILTERS,  ALL or ALLSELECT in your metric to use in that specific line chart.

     

    Without any data is difficult to give you the correct value for this calculation, but should be similar to something like this:

     

    Total Milage = CALCULATE(sum(Table[Mileage]), REMOVEFILTERS(Table[Is Last]))

     

3 Replies

  • Hi Victormar ,

     

    To what I can understand what you want is that a specific visualization overwrites the filter of the Is Latest = 1 and then you can plot your line chart is this correct?

     

    If this is the case you need to use a REMOVEFILTERS,  ALL or ALLSELECT in your metric to use in that specific line chart.

     

    Without any data is difficult to give you the correct value for this calculation, but should be similar to something like this:

     

    Total Milage = CALCULATE(sum(Table[Mileage]), REMOVEFILTERS(Table[Is Last]))

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Victormar ,

     

    May I ask if your problem has been solved? Did MFelix's post above help you? If any of the posts are helpful, then please consider accepting it as a solution to help other members find it faster. Many thanks!

     

    If this doesn't work for you, would you mind providing some data that does not contain private information?

    It makes it easier to give you a solution.

    1. Sample (dummy dataset) data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

    How to provide sample data in the Power BI Forum

    How to Get Your Question Answered Quickly

     

    Best Regards,
    Community Support Team_Gao

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data