This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let CreateDateTable = (StartDate as date, EndDate as date, optional Culture as nullable text) as table => | |
let | |
// Determine number of days between start and end date | |
DayCount = Duration.Days(Duration.From(EndDate - StartDate)), | |
// Add a day back, as Duration math above will give you the days literally between rather than inclusive. Ex Dec 31 - Dec 1 = 30 days, but we need 31 days in that period | |
DayCountAdd = DayCount + 1, | |
// Create a Dates list object starting at the start date, for the duration of the day count, increment of one year | |
Source = List.Dates(StartDate,DayCountAdd,#duration(1,0,0,0)), | |
// Turn that date list into a table | |
TableFromList = Table.FromList(Source, Splitter.SplitByNothing()), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date = | |
ADDCOLUMNS ( | |
CALENDAR ( | |
DATE ( YEAR ( MIN ( 'Sales'[Date] ) ), 1, 1 ), | |
DATE ( YEAR ( MAX ( 'Sales'[Date] ) ), 12, 31 ) | |
), | |
"Year", YEAR ( [Date] ), | |
"Quarter Number", INT ( FORMAT ( [Date], "q" ) ), | |
"Quarter", "Q" & INT ( FORMAT ( [Date], "q" ) ), | |
"Month Number", MONTH ( [Date] ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Run in DAXStudio (http://daxstudio.org/) | |
select [ExplicitName], [IsHidden], [Type], [SourceColumn], [Expression] | |
from $SYSTEM.TMSCHEMA_COLUMNS | |
where TableID = 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Windows\System32\runas.exe /user:DOMAIN\username /netonly "C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Devenv /ResetSettings |
NewerOlder