Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |