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, i am new to PBI , and i have the next situation,
i have 2 tables that look like:
id | created_at |
and
id | price | expired_at |
for each id in first table, i have multiple entry in the second table,
i want to add to the first table a field price in which i have the price from the second table, which was active at the created moment.
Thank you
Hi @cristianj ,
Is it possible to provide screenshots of test data and desired results?
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Best Regards,
Henry
Hi @cristianj ,
According to your description, you can use "make this relationship inactive" for both tables, and then use the USERELATIONSHIP function to count the total value corresponding to the id field.
Measure = CALCULATE(SUM(Table2[Value]),USERELATIONSHIP(Table1[ID],Table2[ID]))
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello
i did not find the answer
First table in which i want to get the price from the second contains the id and the moment of the order,
and in the second i have the id, the price and one more column named expired_at (which says till that moment the price was valid), i want to every lines from the first to get the price which was valid at the moment i made the order in 1 table so i want to get from table 2 the last record which expired_at is smaller then the expired_At value
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 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |