Forum Discussion
Anonymous
7 years agoNot applicable
Problem using measure as argumentes in FILTER function
I am new here, I would like help solving a problem! I'm trying to filter a table passing to a measure's FILTER function, but it does not return values, when I substitute the same measure for "text" ...
AlB
7 years agoCommunity Champion
Anonymous
can you show the code of your measure?
Anonymous
7 years agoNot applicable
Yes for sure. I always select only one row of the table. Measure = VAR __DISTINCT_VALUES_COUNT = DISTINCTCOUNT(‘Table1’[Colun1]) VAR __MAX_VALUES_TO_SHOW = 1 RETURN IF( __DISTINCT_VALUES_COUNT > __MAX_VALUES_TO_SHOW; CONCATENATE( CONCATENATEX( TOPN( __MAX_VALUES_TO_SHOW; VALUES(‘Table1’[Colun1]); ’Table1’[Colun1]; ASC ); ’Table1’[Colun1]; ", "; ’Table1’[Colun1]; ASC ); ", etc." ); CONCATENATEX( VALUES(‘Table1’[Colun1]); ’Table1’[Colun1]; ", "; ’Table1’[Colun1]; ASC ) )
- AlB7 years agoCommunity Champion
Anonymous
Ok, that's a complex measure. Can you share the pbix? It'd be easier to help like that.
Otherwise you could try using the code of the measure directly in the filter argument instead of calling the measure. In that way you could partially check if it is a problem with the context transition derived from the implicit CALCULATE.
- AlB7 years agoCommunity Champion
Anonymous
What table are you doing the FILTER( ) operation on? The Table1 you are referring to in the measure??
- Anonymous7 years agoNot applicable
Thanks for everything!
I want to display in the table aux the selected item in the filter table.