Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
tjordan08
New Member

Incorrect Month displayed when selecting full year in single choice filter

Hello, I have a dashboard that is showing the month /year based on a single choice filter and it works ok, except for when I select the full year ‘2022’ which selects all months up until December. The month in this case displays 'September' (being the last month based on alphabetical order.), but it should show “December’ instead being the last month of the year. I would be ok if it just shows the year too, without the month if that helps. Any suggestions please? Thank you

yearissue.png 

 

2 ACCEPTED SOLUTIONS
tharunkumarRTK
Super User
Super User

@tjordan08 
You are using month name column in a date column hiearachy and used 'LAST' as an aggregation, instead create a measure with the below logic 

maxMonth = 
Var MaxMonthNum = max(Fact_Table[First seen].[MonthNo])
return CALCULATE(MAX(Fact_Table[First seen].[Month]), Fact_Table[First seen].[MonthNo] = MaxMonthNum) 

Screenshot 2024-04-11 at 3.50.35 PM.png


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

View solution in original post

@tjordan08 

try this formula

maxMonth = Var MaxMonthNum = max('Calendar'[MonthNo]) return CALCULATE(MAX('Calendar'[Month]), 'Calendar'[MonthNo]= MaxMonthNum)

View solution in original post

3 REPLIES 3
tjordan08
New Member

THank you Tharun! I just tried but it is still showing September. This is the formula:

maxMonth = Var MaxMonthNum = max('Calendar'[Month]) return CALCULATE(MAX('Calendar'[Month]), 'Calendar'[Month]= MaxMonthNum)

 

or like this which gave me an error?

maxMonth = Var MaxMonthNum = max('Calendar’[First seen].[Month]) return CALCULATE(MAX('Calendar'[First seen].[Month]), 'Calendar'[First seen].[Month]= MaxMonthNum)

 

Anything I missed? 

 

tjordan08_0-1712838920020.png

Thanks

@tjordan08 

try this formula

maxMonth = Var MaxMonthNum = max('Calendar'[MonthNo]) return CALCULATE(MAX('Calendar'[Month]), 'Calendar'[MonthNo]= MaxMonthNum)

tharunkumarRTK
Super User
Super User

@tjordan08 
You are using month name column in a date column hiearachy and used 'LAST' as an aggregation, instead create a measure with the below logic 

maxMonth = 
Var MaxMonthNum = max(Fact_Table[First seen].[MonthNo])
return CALCULATE(MAX(Fact_Table[First seen].[Month]), Fact_Table[First seen].[MonthNo] = MaxMonthNum) 

Screenshot 2024-04-11 at 3.50.35 PM.png


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Top Solution Authors