Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi,
I would like to see if my transaction records happened during daylight or during the night - so the time changes for date to date.
Table 1 - named 'Counts',
with a [Date] and a [Time] column
Table 2 - name 'SunUpDown'
with a [Date], [SunUpTime] and [SunDownTime]
Can anyone please help me how I can make a calculated Column in Table 1, for each record to tell me if it happened during the day or night, on that specifical date.
Assuming there's a relationship between the two date fields - I'd have thought it'd just be a case of just doing a two stage if:
if([Time]<[SunUpTime],"Night",if([Time]>[SunDownTime],"Night","Day"))
I start to suspect that I have made an error in the linking of the tables; as I get the same error as I have gotten during my tests too:
Table 1, with new calculated column
Link between tables
Table 2
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
72 | |
65 | |
50 | |
29 |
User | Count |
---|---|
115 | |
102 | |
71 | |
64 | |
39 |