Forum Discussion
cristianml
Post Prodigy
3 years agoFILTER CALCULATETABLE
Hi,
I want to add a FILTER on this calculatetable , filter with: Revenue < 0
__MINX CCI =
VAR V1 =
CALCULATETABLE(
SUMMARIZE('Rev CCI','Rev CCI'[Contract],"@VALOR_CCI",[CCI],"@VALOR_REV",[Revenue]))
VAR V2 = MINX(V1,[@VALOR_CCI])
RETURN
V2
Where and how Can I add that filter ?
Thanks °!
- Anonymous3 years ago
HI cristianml,
I'd like to suggest you use filter function to package the result table, then you can add condition in it to check and filter on current field values:
__MINX CCI = VAR V1 = SUMMARIZE ( 'Rev CCI', 'Rev CCI'[Contract], "@VALOR_CCI", [CCI], "@VALOR_REV", [Revenue] ) RETURN MINX ( FILTER ( V1, [@VALOR_REV] < 0 ), [@VALOR_CCI] )Regards,
Xiaoxin Sheng
2 Replies
- MahyarTF
Memorable Member
Hi,
If you want to add the filter to the Measure, you could add it in second part of the CalculateTable as below :
CalculateTable( Table[, Filter1, Filter2, ...])
- AnonymousNot applicable
HI cristianml,
I'd like to suggest you use filter function to package the result table, then you can add condition in it to check and filter on current field values:
__MINX CCI = VAR V1 = SUMMARIZE ( 'Rev CCI', 'Rev CCI'[Contract], "@VALOR_CCI", [CCI], "@VALOR_REV", [Revenue] ) RETURN MINX ( FILTER ( V1, [@VALOR_REV] < 0 ), [@VALOR_CCI] )Regards,
Xiaoxin Sheng