Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Visual wih max value until slicer selected

Hi everyone, I have a problem and I doný know I can solve it.
I have a table like this:

I need to build a visual table that when I select the month on slicer the table shows the type and the max value until this month and the date like this:

Can anyone help me? Thanks.

  • Anonymous's avatar
    Anonymous
    5 years ago

    Anonymous 

     

    I used the following table as the example. Check the pbix if needed.

    You can create the following measure, the calender table must disconnect with the this table.

    Measure = IF(MAX([Value])=MAXX(FILTER(ALLSELECTED('Table'),[Type]=MAX([Type]) && [Date]<=SELECTEDVALUE('Calendar'[Date])),[Value]),MAX([Value]))

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

     

3 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    you need to create a date table, in the date table you will have fields like date, month, year.  you connect your   table to the date table on date and then you can aggregate  your data at the month level

     

    its easy to create a date table  see this page for pulling something together thats appropriate for you

     

    https://www.sqlbi.com/articles/creating-a-simpler-and-chart-friendly-date-table-in-power-bi/

     

    if you share some sample data in texxt form I can create a pbix example for you.

     

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have a calendar table.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Anonymous 

         

        I used the following table as the example. Check the pbix if needed.

        You can create the following measure, the calender table must disconnect with the this table.

        Measure = IF(MAX([Value])=MAXX(FILTER(ALLSELECTED('Table'),[Type]=MAX([Type]) && [Date]<=SELECTEDVALUE('Calendar'[Date])),[Value]),MAX([Value]))

        Paul Zheng _ Community Support Team
        If this post helps, please Accept it as the solution to help the other members find it more quickly.