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.
Hello there,
let's imagine there are couples (1 male & 1 female) which are doing some sport together.
I have got two tables. The first table "timestamps" contains timestamps at which the female did sport (without being necessary in partnership). This table contains the columns:
- TimestampID
- Timestamp
- FemaleID
The second table "partnerships" contains some partnerships with a start and an end of the partnership and ofcourse the FemaleID and the MaleID. So the columns are:
- ParntershipID
- FemaleID
- MaleID
- Start
- End (may be "null", which meens it is still "active")
What I want to do is to create a column "MaleID" in the first table. So in the first step I filter those partnerships, where the FemaleIDs in both tables match. In the second step I have to proove, which is the valid partnership for this case. So the timestamp has to be between Start and End.
Some rows may be "null" in this new column, because the girls may not be in a partnership for specific timestamps.
I tried some things with
CALCULATE(Partnerships[Males];Filter(...))
but since I'm new to Power BI and DAX, I'm totally stuck at this point. May somebody help with the right hints, functions or formulas?
Best regards!
JayJay
I also tried with LOOKUPVALUE but it does not applicable for logical comparisons which I need for start <= timestamp <= end comparison.
Of course the FemaleID is connected in the relationships.
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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |