Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
could you please help me on this ?
i wanted to create a 1st day calendar for a next 3 month. I only need the first day of the month. means my table should only have 3 rows.
ex -
1/9/2019
1/10/2019
1/11/2019
Tks
Avantha
Solved! Go to Solution.
Perhpas try something like this in DAX:
Table = VAR __today = TODAY() VAR __month = MONTH(__today) VAR __year = YEAR(__today) VAR __month1 = IF(__month = 12,1,__month+1) VAR __year1 = IF(__month = 12,__year+1,__year) VAR __date1 = DATE(__year1,__month1,1) VAR __month2 = SWITCH(__month,11,1,12,2,__month+2) VAR __year2 = IF(__month >= 11,__year+1,__year) VAR __date2 = DATE(__year2,__month2,1) VAR __month3 = SWITCH(__month,10,1,11,2,12,3,__month+3) VAR __year3 = IF(__month >= 10,__year+1,__year) VAR __date3 = DATE(__year3,__month3,1) RETURN { __date1, __date2, __date3 }
If you want M code, @ImkeF can probably help.
Perhpas try something like this in DAX:
Table = VAR __today = TODAY() VAR __month = MONTH(__today) VAR __year = YEAR(__today) VAR __month1 = IF(__month = 12,1,__month+1) VAR __year1 = IF(__month = 12,__year+1,__year) VAR __date1 = DATE(__year1,__month1,1) VAR __month2 = SWITCH(__month,11,1,12,2,__month+2) VAR __year2 = IF(__month >= 11,__year+1,__year) VAR __date2 = DATE(__year2,__month2,1) VAR __month3 = SWITCH(__month,10,1,11,2,12,3,__month+3) VAR __year3 = IF(__month >= 10,__year+1,__year) VAR __date3 = DATE(__year3,__month3,1) RETURN { __date1, __date2, __date3 }
If you want M code, @ImkeF can probably help.
It works, thanks a million
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |