Forum Discussion

Simon_G's avatar
Simon_G
Frequent Visitor
2 years ago
Solved

Use a Calculated value as a slicer

Hello everyone, 

I have created a dashboard that uses user inputs (in the form of dropdown menus) to calculate a single value (in that case the solar insolation needed for a building). This works well and I'm able to get a final value that I can display. 

For my visual, I would like to filter a map to only show the cities that have a solar insolation value higher than the one calculated (I can do it manually using a slicer and by entering the value I found but I would like it to be automatic). 

My base data is a list of cities with associated solar insolation values. 

I haven't been able to find my solution online yet. 

 

Thank you in advance, 

Simon 

  • Hi Simon_G - Create a measure to filter cities based on whether their solar insolation values are higher than the calculated solar insolation needed. 

     

    Below measure i have used for testing with financial sales and profittotal, you can change it to  solar insolation measure values.

    CitiesFiltered =
    VAR TotalSales = SUMX('financials', financials[Sales])
    VAR TotalProfit = [profittotal]
    RETURN
        IF(TotalSales >= TotalProfit, 1, 0)
     
    In the Filters pane for the map visual, add the CitiesFiltered measure.Set the filter to only include rows where CitiesFiltered is 1.
     

     

     

    try the above process and let know. 

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

2 Replies

  • Hi Simon_G - Create a measure to filter cities based on whether their solar insolation values are higher than the calculated solar insolation needed. 

     

    Below measure i have used for testing with financial sales and profittotal, you can change it to  solar insolation measure values.

    CitiesFiltered =
    VAR TotalSales = SUMX('financials', financials[Sales])
    VAR TotalProfit = [profittotal]
    RETURN
        IF(TotalSales >= TotalProfit, 1, 0)
     
    In the Filters pane for the map visual, add the CitiesFiltered measure.Set the filter to only include rows where CitiesFiltered is 1.
     

     

     

    try the above process and let know. 

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!