title: How to find Min and Max within the group in power bi
body: <p>I am trying to find a DAX formula to show in the card to display the season range between the year and week. I want to get the min week in the min year and max week and max year :</p>
  <p>I have the below table:</p>
  <p><a href="https://i.stack.imgur.com/jNOhy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jNOhy.png" alt="enter image description here" /></a></p>
  <p>I want to show the card like below:
  &quot;Between 2020-33 and 2021-1&quot;</p>
  <p>But the below formula shows as :
  &quot;Between 2020-1 and 2021-52&quot;</p>
  <p>Can anyone please help me to find the DAX to show the correct card?</p>
  <p>My current formula is like below:</p>
  <pre><code>Min_Season =
  CALCULATE (
      MIN ( 'Year-Week_Table'[Year] ),
      FILTER ( 'Flag-Year-Week_Table', 'Flag-Year-Week_Table'[STD_CY_Ind] = 1 )
  ) &amp; &quot;-&quot;
      &amp; CALCULATE (
          MIN ( 'Year-Week_Table'[Week] ),
          FILTER ( 'Flag-Year-Week_Table', 'Flag-Year-Week_Table'[STD_CY_Ind] = 1 )
      ) &amp; &quot; and &quot;
      &amp; CALCULATE (
          MAX ( 'Year-Week_Table'[Year] ),
          FILTER ( 'Flag-Year-Week_Table', 'Flag-Year-Week_Table'[STD_CY_Ind] = 1 )
      ) &amp; &quot;-&quot;
      &amp; CALCULATE (
          MAX ( 'Year-Week_Table'[Week] ),
          FILTER ( 'Flag-Year-Week_Table', 'Flag-Year-Week_Table'[STD_CY_Ind] = 1 )
      )
  </code></pre>