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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
admin11
Memorable Member
Memorable Member

How to make my card display Feb - 22 when i select month = 2 ?

Hi All

 

I hve below expression from @v-yalanwu-msft  :

 

Month last YALANWU =
FORMAT (
DATE ( MAX ( 'DATE'[YEAR2] ), MONTH ( TODAY () ) - 1, DAY ( TODAY () ) ),
"mmm-yy")

 

it will return Mar-22 when i click on month = Feb. ( See below image )

 

When i change -1 to -2

Return Jan - 22

 

When i change -1 to -0

Return Mar - 22

 

admin11_0-1648509687379.png

 

Hint :- Now is March 29  when i click month = Feb 

 

Paul

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @admin11 

 

If you have Date or Month column in DATE table, you can try this

Month measure =
FORMAT (
    DATE ( MAX ( 'DATE'[YEAR2] ), MONTH ( MAX ( 'DATE'[Date] ) ), 22 ),
    "mmm-yy"
)

Or

 

Month measure =
FORMAT ( DATE ( MAX ( 'DATE'[YEAR2] ), MAX ( 'DATE'[Month] ), 22 ), "mmm-yy" )

 

DATE(Year, Month, Day) function has Year/Month/Day parts, you can modify every part individually. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @admin11 

 

If you have Date or Month column in DATE table, you can try this

Month measure =
FORMAT (
    DATE ( MAX ( 'DATE'[YEAR2] ), MONTH ( MAX ( 'DATE'[Date] ) ), 22 ),
    "mmm-yy"
)

Or

 

Month measure =
FORMAT ( DATE ( MAX ( 'DATE'[YEAR2] ), MAX ( 'DATE'[Month] ), 22 ), "mmm-yy" )

 

DATE(Year, Month, Day) function has Year/Month/Day parts, you can modify every part individually. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors