The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
@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)
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
@tjordan08
try this formula
maxMonth = Var MaxMonthNum = max('Calendar'[MonthNo]) return CALCULATE(MAX('Calendar'[Month]), 'Calendar'[MonthNo]= MaxMonthNum)
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?
Thanks
@tjordan08
try this formula
maxMonth = Var MaxMonthNum = max('Calendar'[MonthNo]) return CALCULATE(MAX('Calendar'[Month]), 'Calendar'[MonthNo]= MaxMonthNum)
@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)
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
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |