Forum Discussion
WinterMist
Impactful Individual
2 years agoUnable to Reference VAR Table Columns
Hello Community - So I am aware that: "a variable name cannot be used as a table name in a column reference" (https://www.sqlbi.com/articles/table-and-column-references-using-dax-variables/) ...
- 2 years ago
One option is to use v1 as a filter table like this:
VAR v1 = FILTER ( ALL ( 'D Crop' ), 'D Crop'[CropKey] IN { 5767, 6014, 5408, 5769, 6015, 5438 } ) VAR v2 = CALCULATETABLE ( DISTINCT ( 'D Crop'[Crop Abbrev] ), v1 ) VAR v3 = CONCATENATEX ( v2, 'D Crop'[Crop Abbrev], ", ", 'D Crop'[Crop Abbrev], ASC ) EVALUATE v3
WinterMist
Impactful Individual
2 years agoAlexisOlson - Thanks very much for the help!