Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, I´m trying to get the days from the first day of the month until TODAY (function). In Excel I use WORKDAY.INTL but I don´t know which DAX Function to use or if it´s posible.
What I´m trying to get is my daily sales. Example= 100,000/8 . I want to ge the 8 automatically, in this example there are 8 days between apr-1-2016 and apr-9-2016 because I´m not considering Sundays.
Solved! Go to Solution.
If you want to automate this - you'll have to incorporate this in your Calendar Table - read about it here
@Paco Try this... Let me know if it works
Number of Days = DATEDIFF ( STARTOFMONTH(Table1[Date]), ENDOFMONTH(Table1[Date]), DAY)
I really appreciate you quickly answer, I try the function and it's working, theres is only one missing, It's counting Sundays and I don't want to count them.
In Excel the formula WORKDAY.INTL(start_date, days, [weekend], [holidays]) I have to enter 11 inside [holidays] to not to count sundays.
If I use the function Number of Days = DATEDIFF(DATEVALUE("04/01/2016"),TODAY(),DAY)+1 the result is 21 and I need 18 because there are 3 sundays that I don't want to count,
Thank you!! 😄
Note: An apology if there is some misspelling but I´m from Mexico 😄 :S
Sorry in Excel I have to enter 11 in [Weekend]
If you want to automate this - you'll have to incorporate this in your Calendar Table - read about it here
Thank you very much, I already create a table with the days. I´m new in DAX, which funtcion do I have to use to select the column in which I have the value.
I already have my fomula like this:
DailySales = TOTALMTD(SUM(Sales2016[Total]),Sales2016[Date])/ (I want to know the function to select the column [Labdays] of the current month from the Days table )
I create a table Days with 2 columns
Column 1 [Month] contains the month 1,2,3,4, etc
Column 2 [Labdays] contains laboralbes days example month 1 labdays 25, month 2 labdays 24, etc.
@Paco I think TotalMTD requires the second part of the formula to point to the calendar/date table
so if your formula is not working => change Sales2016[Date] to CalendarTableName[Date Column]
Thank you very much for your support I already solved it with your help 😄
User | Count |
---|---|
93 | |
83 | |
77 | |
72 | |
66 |
User | Count |
---|---|
115 | |
103 | |
93 | |
64 | |
61 |