Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear all,
I am wondering?
If I have Table 1, Table 2 and Table 3, Query A, Query B and Query C.
Query A produces a scalar date value which is the Max of dates in Table 1.
Query B runs a Select Rows operation using the result of Query A to filter the range of dates returned from Table 2.
Query C runs a Select Rows operation using the result of Query A to filter the range of dates returned from Table 3.
Is Query A only calculated once and the value used in Query B and Query C, or is Query A calculated separately for both Query B and Query C.
If this is true what is the best way to do things so that I only need to calculated Query A once to be used by both Query B and Query C rather than having to calculate it multiple times.
[removed]
Hi @Eric_Zhang
Can you please explain this:
If you'd like the Query1 run only once, then you can create it as a function.
Is turnung a query into an invoked function result prevents it from recalculating when other queries linked to it? Or it depends from data source?
How it could be referenced to this thread?
@hohlick @Anonymous
My bad, as the function in M is called manually in my case so I thought it persists as a constant and won't be re-evulated. I'm deleting that part in my reply to avoid missleading.
Thanks for that link, it is really really helpful.
Thank you very much. I will try that out as I update some of my data models.
Dear all,
I am wondering?
If I have Table 1, Table 2 and Table 3, Query A, Query B and Query C.
Query A produces a scalar date value which is the Max of dates in Table 1.
Query B runs a Select Rows operation using the result of Query A to filter the range of dates returned from Table 2.
Query C runs a Select Rows operation using the result of Query A to filter the range of dates returned from Table 3.
Is Query A only calculated once and the value used in Query B and Query C, or is Query A calculated separately for both Query B and Query C.
If this is true what is the best way to do things so that I only need to calculated Query A once to be used by both Query B and Query C rather than having to calculate it multiple times.
User | Count |
---|---|
103 | |
87 | |
77 | |
70 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |