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,
I m unable to use virtual tables with variables while creating measures.
Im using PBI Dektop (Feb 2021) and found it strange.
Any configuration that I need to enable?
Please refer the measures below:
//This Works:
//This doesnt:
Error message --> Table variable 'Virtual table' cannot be used in current context because a base table is expected.
Kindly ignore what I m trying to do in the above measures. Its only a trial 🙂
Thanks for your help.
Regards,
Mannu
Solved! Go to Solution.
Hi @modi123p
SQLBI have written a great article on this so rather than retype everything here, here's the link
Table and column references using DAX variables - SQLBI
Basically, assigning a table to a variable does not make the variable a table. So you can't reference columns 'inside' the variable as you would with a table.
The article describes a couple of workarounds to this problem.
Regards
Phil
Proud to be a Super User!
Hi @modi123p
SQLBI have written a great article on this so rather than retype everything here, here's the link
Table and column references using DAX variables - SQLBI
Basically, assigning a table to a variable does not make the variable a table. So you can't reference columns 'inside' the variable as you would with a table.
The article describes a couple of workarounds to this problem.
Regards
Phil
Proud to be a Super User!
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |