Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi I'm trying to write a measure that would show me how many hours are need each month to get to an expected billable.
I work at a law firm and the billable year is 2020-11-1 to 2021-10-31.
I have a measure that tells me the expected hours, I have another measure that tells me how many hours has be worked hour has been billed to date
I created a measure
Solved! Go to Solution.
Hi @Anonymous
You can use "DATEDIFF" DAX code.
Try this measure:
remaining months =
VAR _Today =
TODAY ()
VAR _ENdOfBY =
DATE ( YEAR ( _Today ), 10, 31 )
VAR _RD =
DATEDIFF ( _Today, _ENdOfBY, MONTH )
RETURN
IF ( _Rd < 0, ABS ( _RD ) + 10, _RD )
It will calculate the remaining month between Today and end of billable year, so now it will return 2 because we are in the middle of August, so if you want to consider the current month in your calculation (to return3), just add +1 at the end of the last row [ IF ( _Rd < 0, ABS ( _RD ) + 10, _RD )+1].
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi @Anonymous
You can use "DATEDIFF" DAX code.
Try this measure:
remaining months =
VAR _Today =
TODAY ()
VAR _ENdOfBY =
DATE ( YEAR ( _Today ), 10, 31 )
VAR _RD =
DATEDIFF ( _Today, _ENdOfBY, MONTH )
RETURN
IF ( _Rd < 0, ABS ( _RD ) + 10, _RD )
It will calculate the remaining month between Today and end of billable year, so now it will return 2 because we are in the middle of August, so if you want to consider the current month in your calculation (to return3), just add +1 at the end of the last row [ IF ( _Rd < 0, ABS ( _RD ) + 10, _RD )+1].
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
92 | |
65 | |
63 | |
43 | |
40 |