cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

@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

Highlighted

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
Highlighted
Solution Sage
Solution Sage

@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

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors