Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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!
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |