The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
when we use these two functions, i know it's gonna apply to all the data if there is no data applicable.
Hi there.
First of all, you should read this: https://dax.guide/firstdate/ and when you do, please read it WELL with full attention to the DETAILS.
Secondly, you should be aware that FIRSTDATE is a table function that returns a TABLE, not a value (even though it can be automatically converted into a value on demand).
Thirdly, you should use this function only on A PROPER DATE TABLE. Same is (even more) true for DATEADD. If you don't follow the rules, then you'll be sorry rather sooner than later 🙂 Please mark my words well.
FIRSTDATE returns the very first date in the column passed in as the parameter. DATEADD shifts a column by the desired amount of time BUT ONLY IF the shifted period is present in the passed-in column. If not, then BLANK will be returned and hence all other time-related functions will return BLANK. Let me warn you again: DO NOT USE TIME-INTELLIGENCE FUNCTIONS ON NON-DATE TABLES.
Best
Darek
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |