Forum Discussion
Table as a variable doesn't work
- 5 years ago
Hey Veigar ,
you can filter a calculated table. I don't see why this should not be possible.
The measures you posted in the initial post cannot work. You put variables (VAR) but there is no RETURN. That just doesn't work. Check out the syntax:
But as far as I understand that measure is not working at the moment, right?
I realized you want to do some ABC analysis. Check the article on dax patterns, maybe that will help you:
ABC classification – DAX Patterns
Best regards
Denis
selimovd , A static table is a calculated table (at least for me). The kind of tables that you can find on the right of the screen.
I posted all of the measure i wrote, i'm only stuck because i cannot add another column to the first variable. If i understand this, I can finish the measure by my self.
Thanks
- selimovd5 years agoMost Valuable Professional
Hey Veigar ,
you can filter a calculated table. I don't see why this should not be possible.
The measures you posted in the initial post cannot work. You put variables (VAR) but there is no RETURN. That just doesn't work. Check out the syntax:
But as far as I understand that measure is not working at the moment, right?
I realized you want to do some ABC analysis. Check the article on dax patterns, maybe that will help you:
ABC classification – DAX Patterns
Best regards
Denis
- Veigar5 years agoFrequent Visitor
Hi selimovd ,
I know that i have to put the return, but, as you said, the measure was not completed.
Second, I can filter a calculated table, but i wanted to filter the rows in which will be calculated the ABC.
I give you an example:
I have 100 items and i created a calculated table for the ABC for all of the items. Now if i want to calculate the ABC of only the items that are, for example, red, the filter will select the rows where the item has that quality (is red), but the ABC analysis is done on all the items and then filter.
My aim is to filter first, and then apply the ABC Analysis.
I found the same link you found about the ABC and then I realized my approach was totally wrong, also because I was not so sure what to return.
So i will try to implement it in my code.
Thank you very much, you were fundamental.