Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, can someone please help me with a dax..
I have imported data from SQL and there are more than 80 tables.. the sample is like this
Table 1
Task ID | Task Name | Star Date | End Date |
1 | A | ||
2 | B | ||
3 | C | ||
Table 2 - Task ID-1
Task ID | Date |
1 | |
1 | |
1 | |
1 |
Table 3 - Task ID-2
Task ID | Date |
2 | |
2 | |
2 | |
2 |
I have several such tables .. I want to calculate min & max date and insert them in table-1 in Start & End Date.
My relationship are one to many for these tables.
Thank you.
Solved! Go to Solution.
Hi @mohammadyousaf ,
According to your description, refer to the following formula whether it can meet your needs.
M_min =
CALCULATE (
MIN ( Table_dimension[Date] ),
FILTER ( ALL ( Table_1 ), Table_1[Catesgory] = MAX ( Table_1[Catesgory] ) )
)
M_max =
CALCULATE (
MAX ( Table_dimension[Date] ),
FILTER ( ALL ( Table_1 ), Table_1[Catesgory] = MAX ( Table_1[Catesgory] ) )
)
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your feedback.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mohammadyousaf ,
According to your description, refer to the following formula whether it can meet your needs.
M_min =
CALCULATE (
MIN ( Table_dimension[Date] ),
FILTER ( ALL ( Table_1 ), Table_1[Catesgory] = MAX ( Table_1[Catesgory] ) )
)
M_max =
CALCULATE (
MAX ( Table_dimension[Date] ),
FILTER ( ALL ( Table_1 ), Table_1[Catesgory] = MAX ( Table_1[Catesgory] ) )
)
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your feedback.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you.. it worked only for one table for me since I don't have date table. Each Table has its own dates and I am unable to connect it to date table as my data model is very complex, let's say around 100 tables imported from SQL.
Can you please assist me on creating variable and collecting dates or quantity from rest of the tables.
Thanks.
@mohammadyousaf I think the first thing you should do is to append all of your Task ID tables together. Then you could create a single relationship and pretty much done.
I already have a table with Task ID which is table-1, I need to collect the max and mi date against each ID from the corresponding tables.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
109 | |
100 | |
39 | |
31 |