Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I have a very critical formula to evaluate by row, how much of an amount falls between one or more dates. The detailed question is here: http://superuser.com/questions/723200/excel-dates-how-much-of-a-period-falls-in-a-financial-year
But the formula is this:
=MAX(0,MIN(ENDDATE,ENDOFMONTH)-MAX(STARTDATE,BEGINOFMONTH))
So where an example month is 3/1/2015-3/31/2015, an invoice would show 2/15/2015-3/5/2015 and return 5 days for the March period.
Is this possible to create by adding custom columns for each period, and what would it look like in Dax?
There is a forum over at powerpivotpro.com that you could ask this question in. I am beyond positive that you would have an answer quickly from them. Not saying anything negative about this forum at all. I love it here. But there are some DAX gurus on that forum who can create the most amazing measures.
Proud to be a Super User!
Without an understanding of what your data looks like it's nearly impossible to suggest solutions. Sample data (doesn't have to be real, just mock up something with the same structure) would be incredibly helpful in helping you. And please don't just screenshot an Excel sheet. No one wants to enter all of your data by hand. Share a workbook on OneDrive or similar.
If you have a table which contains all days of the year then in theory you could use the COUNTA function to count the number of days for March. Without seeing the data it is tricky, however if you had a table with the months, e.g Jan, Feb, Mar etc. then you could insert the invoice number and then the measure:
Days in remaining in invoice = counta(Date[Date Key]) I beleive this would show you the days in month remaining. However like I said without the data I am not too sure.
Someone may have a much better example.
Giles
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 138 | |
| 111 | |
| 50 | |
| 33 | |
| 29 |