Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Card with percentage

Good afternoon,

 

I have a table with two columns, Year and percentage. Want to return the highest year's percentage on a card, any ideas?

  • Aha!

     

    I think this might be close.  Just change where I have Table2 to your tablename

     

    Measure = 
    VAR maxYear = MAX('Table2'[Ano])
    RETURN CALCULATE(
    				MAX('Table2'[Reajustes]),
    				FILTER(
    					'Table2',
    					'Table2'[Ano] = maxYear
    					)
    				)

10 Replies

  • Drop percentage column on card and change aggregation to MAX.

     

    Add a slicer for year to pick a year.

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    HI Anonymous

     

    There are a bunch of ways you can do this.

     

    One quick thing to try might be to use the Top N filter on your visual.

     

    Otherwise there will be ways to solve this using DAX or M

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Phil_Seamark

       

      Thanks for your response.

       

      Could you give me the way to resolve with a dax measure. I need to use the result in another measure.

       

      Remember, the table has two columns (year and percentage) and I want to get the percentage of the largest year.

      • Phil_Seamark's avatar
        Phil_Seamark
        Icon for Microsoft Employee rankMicrosoft Employee

        Do you just want the percentage value?  Or do you somehow need the year as well?