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.
Hi, The following is a measure from Marco Ruso. It works perfectly, but I want to understand it deeper. Thanks in advance.
1- In the Variable "FirstPurchaseCustomers" is the ADDCOLUMNS a virtual column? If yes, to which table? Sales?
Solved! Go to Solution.
@gtamir wrote:
So it stays in memory as long as the project is on and you can refer to it, as I understand.
No, the "table" only exists in memory for a few milliseconds while the measure is being evaluated in the context of a query. You cannot refer to it outside of the measure. "virtual tables" is not a specific term, I'm using "virtual" as an adjective to describe the fact that the table variable is temporary and not persisted anywhere. It only exists for the duration of the evaluation of the measure (this is the way all variables defined using the VAR keyword behave).
FirstPurchaseCustomers is table based on sales, addcolumns create a table
https://docs.microsoft.com/en-us/dax/addcolumns-function-dax
The filter will again return the filtered table as
https://docs.microsoft.com/en-us/dax/filter-function-dax
and after filter, you are only getting new customers. So countrows of the table is returned.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
So it is a virtual table.
@gtamir wrote:
So it is a virtual table.
Yes, it logically creates a virtual 2 column table with the CustomerKey and DateOfFirstBuy columns
@d_gosbell Thank you. So it stays in memory as long as the project is on and you can refer to it, as I understand.
I didn't find any article about virtual tables. Do you know of anything written about the issue?
@gtamir wrote:
So it stays in memory as long as the project is on and you can refer to it, as I understand.
No, the "table" only exists in memory for a few milliseconds while the measure is being evaluated in the context of a query. You cannot refer to it outside of the measure. "virtual tables" is not a specific term, I'm using "virtual" as an adjective to describe the fact that the table variable is temporary and not persisted anywhere. It only exists for the duration of the evaluation of the measure (this is the way all variables defined using the VAR keyword behave).
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 |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |