cancel
Showing results for
Did you mean:
Highlighted
Anonymous
Not applicable

## How to find the Min by Month and Year

I am trying to find the Min Seq number by Month and Year.

Below I have a Matrix where I am finding the Min Sequence Number which is working at the monthly level.

For the month of Feb I want to see a Total of 6 which is correct. Also the Min for March is 8 which is also correct.

However, I am also looking for the Min for the whole year while still showing the Months.

Below, I have a Min of 6 for the year. I would like to only see 6 and not see 8 when I expand for 2019

I tried to find the Min of total with no success.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support

## Re: How to find the Min by Month and Year

Hi, @Anonymous

Table:

You may create a measure and a calculated column as follows.

``````calculated column:
Month Year = FORMAT('Table'[FROM_FILL_DATE],"mmm-yyyy")

Measure:
IF(
ISINSCOPE('Table'[FROM_FILL_DATE].[Month]),
CALCULATE(
FILTER(
ALLSELECTED('Table'),
MONTH('Table'[FROM_FILL_DATE]) = MONTH(MAX('Table'[FROM_FILL_DATE]))&&
YEAR('Table'[FROM_FILL_DATE]) = YEAR(MAX('Table'[FROM_FILL_DATE]))
)
),
CALCULATE(
FILTER(
ALLSELECTED('Table'),
YEAR('Table'[FROM_FILL_DATE]) = YEAR(MAX('Table'[FROM_FILL_DATE]))
)
)
)``````

Result:

Best Regards

Allan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Highlighted
Super User VII

## Re: How to find the Min by Month and Year

@Anonymous share some sample data and will get you the solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Highlighted
Anonymous
Not applicable

## Re: How to find the Min by Month and Year

I sent you a sample pbix file. Having challenges posting here.

This is a screen shot of what was sent.

Highlighted
Community Support

## Re: How to find the Min by Month and Year

Hi, @Anonymous

Table:

You may create a measure and a calculated column as follows.

``````calculated column:
Month Year = FORMAT('Table'[FROM_FILL_DATE],"mmm-yyyy")

Measure:
IF(
ISINSCOPE('Table'[FROM_FILL_DATE].[Month]),
CALCULATE(
FILTER(
ALLSELECTED('Table'),
MONTH('Table'[FROM_FILL_DATE]) = MONTH(MAX('Table'[FROM_FILL_DATE]))&&
YEAR('Table'[FROM_FILL_DATE]) = YEAR(MAX('Table'[FROM_FILL_DATE]))
)
),
CALCULATE(
FILTER(
ALLSELECTED('Table'),
YEAR('Table'[FROM_FILL_DATE]) = YEAR(MAX('Table'[FROM_FILL_DATE]))
)
)
)``````

Result:

Best Regards

Allan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021