Forum Discussion
Virtual table referencing in measures
- 6 years ago
Yes, I do it all the time, but your code would be:
GreenBars = VAR SumTable = SUMMARIZECOLUMNS( 'Table'[Year], 'Table'[Period], "BIAS", CALCULATE( [BIAS Base] ) ) Return COUNTROWS(FILTER(SumTable, [BIAS] <= .05 && [BIAS] >= -.05))
Hey LABORSAL ,
the simple answer to your question is: yes.
It's very common to create a table (a virtual table) inside a measure, and assign this table to a variable.
And use this variable further down the measure.
For this, I'm wondering what is your exact question.
By, the way it's not necessary to wrap the reference to the measure [BIAS Base] into a CALCULATE, as referencing a measure implicitly is exactly doing this.
If your measure does not return the exact result, please provide a pbix file that contains sample data but still reflects your data model. Upload the file to onedrive or dropbox and share the link. If you are using Excel to create the sample data, share the Excel file as well.
Regards,
Tom