Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
I am struggeling with a DAX function and hope somebody can help me. I have three different tables (M, P, R). In my R table I have a timestamp for every ID. In my P table I have a timestamp as well but it occurs multiple times for the same ID. What I need to achieve is to finde the earliest timestamp from my P table and calculate the datediff with my timestamp from my R table. The connection between those two tables is made through my M table. I have a P GUID in my P and my M table and have a R GUID in my R and my M table. The M table has as well a GUID.
Thanks for any help!
Solved! Go to Solution.
Hi,
I assume that you want to Create this Difference in the R Table which contains of all Unique Values. You would need to add a new column with the below Expression. This would Calculate the MIN Date from the P Table for its Corresponding ID in R Table.
Min_Date:=DATEDIFF(DATE(YEAR(R[Timestamp]), MONTH(R[Timestamp]),DAY(R[Timestamp])), CALCULATE(MIN(P[Time_Stamp]), TREATAS(VALUES(R[ID]), P[ID] )),DAY)
Best Regards,
Vignesh M
If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂
Hi,
I assume that you want to Create this Difference in the R Table which contains of all Unique Values. You would need to add a new column with the below Expression. This would Calculate the MIN Date from the P Table for its Corresponding ID in R Table.
Min_Date:=DATEDIFF(DATE(YEAR(R[Timestamp]), MONTH(R[Timestamp]),DAY(R[Timestamp])), CALCULATE(MIN(P[Time_Stamp]), TREATAS(VALUES(R[ID]), P[ID] )),DAY)
Best Regards,
Vignesh M
If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
10 |