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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Arenna
New Member

Fields not appear in new measure

Help..

I have column named "Driver_Card_Expiry_Date". I tried to use New Measure.

     Months Left = DATEDIFF ([Today Date], ________________, MONTH)

 

The column I want won't appear. Please help tp solve. I've been at it for half a day.

 

Thanks.

2 ACCEPTED SOLUTIONS
SivaMani
Resident Rockstar
Resident Rockstar

@Arenna,

 

You can't use the column as a reference in measure since measure expects and returns a single value.

 

Use LASTDATE() DAX function. it will take last non-blank date and calculate month difference.

 

E.g,

 Months Left = DATEDIFF ([Today Date], LASTDATE(Driver_Card_Expiry_Date), MONTH)

View solution in original post

Thanks Siva,

It took me my whole morning to learn about that. I just found the 5 golden rules for DAX Measures, and no.2 is No Naked Column.

I understood that and use the Calculated Columns instead. And voilaa..!  It works.

 

MONTHS LEFT = DATEDIFF(TODAY(), DRIVER[Date Expire].[Date], MONTH)

 

Thanks for your input Siva !

 

 

View solution in original post

2 REPLIES 2
SivaMani
Resident Rockstar
Resident Rockstar

@Arenna,

 

You can't use the column as a reference in measure since measure expects and returns a single value.

 

Use LASTDATE() DAX function. it will take last non-blank date and calculate month difference.

 

E.g,

 Months Left = DATEDIFF ([Today Date], LASTDATE(Driver_Card_Expiry_Date), MONTH)

Thanks Siva,

It took me my whole morning to learn about that. I just found the 5 golden rules for DAX Measures, and no.2 is No Naked Column.

I understood that and use the Calculated Columns instead. And voilaa..!  It works.

 

MONTHS LEFT = DATEDIFF(TODAY(), DRIVER[Date Expire].[Date], MONTH)

 

Thanks for your input Siva !

 

 

Helpful resources

Announcements
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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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