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 There,
This might be a very simple topic but I am struggling with DAX. Could someone please help.
I have a table [Table_CallLog] having one of it's column named 'Call_DateTime'. I have another Table [Table_DSTReference] with three columns, Year, DST_StartDateTime and DST_EndDateTime. Which gives a reference to Start and End of Daylight saving time for several years.
What I tried doing is..
Step 1. Added a Column [named as Year_CallLog] (In Source SQL itself) to get Year(Call_DateTime).
Step 2. Joined Table_CallLog with Table_DSTReference based on Year_CallLog to Year (Many to 1).
Step 3. (This is where I'm stuck) Trying to add a measure/calculated column in Table_CallLog, which will check
if(Table_CallLog.CallDateTime >= Table_DSTReference.DST_StartDateTime && Table_CallLog.CallDateTime < Table_DSTReference.DST_EndDateTime, "Summer", "Winter")
Is this correct syntax? seems I'm unable to write it that way.
Solved! Go to Solution.
Hi @RKM
If you want a DAX Calculated Column, connect the Year column in the two tables and use it
Column = IF(Table_CallLog[Call_DateTime]>=RELATED(Table_DSTReference[DST_StartDateTime])&&Table_CallLog[Call_DateTime]<RELATED(Table_DSTReference[DST_EndDateTime]),"Summer","Winter")
Hi @RKM
If you want a DAX Calculated Column, connect the Year column in the two tables and use it
Column = IF(Table_CallLog[Call_DateTime]>=RELATED(Table_DSTReference[DST_StartDateTime])&&Table_CallLog[Call_DateTime]<RELATED(Table_DSTReference[DST_EndDateTime]),"Summer","Winter")
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |