Forum Discussion
DPCCGF
Helper IV
2 years agoDAX If Statement with Unrelated Table
Hi all, I have two tables, one called Call for Services and one called Shift. The Call for Services, each record, has a Department (there are 26 departments). The Shift table has all the Department...
DPCCGF
Helper IV
2 years agoHi Vanessafvg, were you able to look at my last post and offer any suggestions? From what I can tell it should be working!
- DPCCGF2 years ago
Helper IV
Hi Vanessa..........so I think I got the below working except for one item. If the Dispatch time is AFTER 10PM and before 6:30AM nothing is returened. The other times work as they fall within the item in RED below. Recommended change?
Agency Shift Test =var agency = SELECTEDVALUE('Call For Services'[Agency])var dispatchtime = max('Call For Services'[Dispatched Time])var shift = CALCULATE(max(Shifts[ShifitName]), (Shifts[Agency] = agency) && (dispatchtime >= Shifts[HourStart] && dispatchtime <= Shifts[HourEnd]))return shift- vanessafvg2 years ago
Community Champion
I would never be able to tell you without seeing the data please provide the data for those records and the actual shift data that relates to it. Also what data types you are now using.
- DPCCGF2 years ago
Helper IV
I have a PBIX, how can I get it to you? Do not know how to attach a file here.