Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I am trying to create a measure to return the value on the last day of the previous month but don't seem to be successful.
My dataset has values for each day, but I am only interested in the value (not sum) at the end of month.
I have tried this:
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, here's my solution.
Modify the formula to:
Measure 300 =
CALCULATE (
[Total EOD Balance in GBP],
FILTER (
ALL ( 'Value Date' ),
'Value Date'[Date] = EOMONTH ( MAX ( 'Value Date'[Date] ), -1 )
)
)
I create a sample and get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, here's my solution.
Modify the formula to:
Measure 300 =
CALCULATE (
[Total EOD Balance in GBP],
FILTER (
ALL ( 'Value Date' ),
'Value Date'[Date] = EOMONTH ( MAX ( 'Value Date'[Date] ), -1 )
)
)
I create a sample and get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi
Click here to download a solution
How it works.
Firstly, please do all these free training modules to lcearn about calendar tables and monthly offset
This dax measure gets the calendar offset to get the last date of the previous month.
Then uses FILTER to create a subset for that date.
Then uses CALCULATE to get the balance for that subset.
Thanks for reaching out for help.
I put in a lot of effort to help you, now please quickly help me by giving kudos.
Remeber we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.
If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime. I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !