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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
thos123
Regular Visitor

How i can code DAX for display year?

How i can code DAX for display year?
Year (min month-max month) for this year
Ex. 2015 (Jan-Oct)

Thanks.
5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

=CONCATENATE(CONCATENATE(CONCATENATE(CONCATENATE(FORMAT("yyyy",[Date])," ("),FORMAT("mmm",[Date])),"-"),FORMAT("mmm",[OtherDate])),")")

 

Something like that. Need your orignal data to be sure.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

sorry I answered delay. I want to show like this.

years201320142015(JAN-OCT)
data111122223333

My time data like this.

Times_IDYearQuatorM-indexM-shortM-full_NameDayinMonth
1201111JANJanuary31
2201112FEBFebruary28
3201113MARMarch31
4201124APRApril30
5201125MAYMay31
6201126JUNJune30
7201137JULJuly31
8201138AUGAugust31
9201139SEPSeptember30
102011410OCTOctober31
112011411NOVNovember30
122011412DECDecember31

Thanks.

Hi @thos123,

 

I am not sure I got your question right. You already have the year in both tables (date table and fact table). So where do you want to "display" the year?! In a (pivot) table?! In that case you don't need to code DAX at all. Just use the column "year" of your date table?!?!

 

Regards,

Lars

Sorry for late answer.

I want to show month name in year label because the data is as of last month in 2015, not whole year.

 

Thanks.

Nazila
New Member

Sorry I posted in a wrong thread.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.