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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Rashidb84
Helper I
Helper I

DAX EOMONTH formula: comparing values in column with an absolute cell references

Hi,

 

I've created a new Excel file on which I worked yesterday. In it I have added a  DAX formula to compare the current month ends date with the date in column Net due date. This worked fine yesterday. 

But as we moved to a new month today the values changed which I didn't realise yesterday. The end of month date basically for the file shouldn't change automatically. 

 

=if('Open AP'[Net due date]<=EOMONTH(today(),0),"Yes","No")

Rashidb84_0-1714560471757.png

 

I therefore uploaded a new sheet in which I will monthly amend the date value manually. Uploaded this file:

 

Rashidb84_0-1714569169599.png

 

After amending the initial formula to compare the Net due date with the Month end date value I'm getting the following result:

 

Rashidb84_1-1714569261836.png

 

Rashidb84_2-1714569295351.png

 

 

I tried an absolute reference (the usual Excel method), and discovered that it doesn't work in DAX as it references to columns.

 

I basically want to compare the month end date of the reported month (usually the month we are in, but if the file is opened in a new month the details shouldn't change because we are in a new month) with the Net due date and establish if Net due date is bigger, equal to month end date or the Month end date is bigger.

 

If absolute reference indeed doesn't work, how can this be solved?

 

Thank you for your time!!! 

3 REPLIES 3
Rashidb84
Helper I
Helper I

Hi All,

 

I'm understanding now that DAX doesn;t do absolute cel references like in Excel. Via a measure I will have to create a column with the data in the cel that I want to reference. Basically a column that will repeat the data of the absolute cel reference on each line. 

 

I will try to work on this tomorrow. Will update this post with pics if I get to a solution.

lbendlin
Super User
Super User

See if you can refactor your approach from  "EOMONTH of latest (current) date"  to "EOMONTH for the latest data date".

Hi Ibendlin,

 

Thank you for your response.

 

Not sure if I understand you correctly. I clarified my initial approach above with some additional printscreens. I had ameded the formula from : EOMONTH(today(),0) to refer to the Date tab 'Date'[Month end date].

 

The result of this was the calculation error shown in my first post (updated pic).

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors