Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello!
How do I apply two or more filters in the same query?
Query= CALCULATE([Valores Totais];'Sintético'[Tipo]="Outros") +CALCULATE([Valores Totais];'Sintético'[Tipo]="Receitas")
Thank you!
Solved! Go to Solution.
@Baskar- you are correct that a measure will allow FILTER() function within CALCULATE().
However I believe the suggestion from @tringuyenminh92 will not produce the desired results because it uses an AND (&&) clause and should use an OR ( || ) clause.
So either formula should work in most situations.
Query = CALCULATE ( [Valores Totais], FILTER ( Sintetico, Sintetico[Tipo] = "Outros" || Sintetico[Tipo] = "Receitas" ) )
Query = CALCULATE ( [Valores Totais], Sintetico[Tipo] = "Outros" || Sintetico[Tipo] = "Receitas" )
Try this one
Query =
CALCULATE (
[Valores Totais],
OR (Sintetico[Tipo] = "Outros" , Sintetico[Tipo] = "Receitas")
)
It is not solve your prob share some sample data
Hi @Gelain,
you could put them inside filter method:
Query= CALCULATE([Valores Totais],filter(Sintético,'Sintético'[Tipo]="Outros" && 'Sintético'[Tipo]="Receitas" ) )
If this works for you please accept it as solution and also like to give KUDOS.
Best regards
Tri Nguyen
Hi @tringuyenminh92!
I installed the latest version of Power BI and only accepted without the filter:
Query = CALCULATE([Valores Totais];('Sintético'[Tipo]="Receitas" || 'Sintético'[Tipo]="Despesas"))
What do you think?
Thank you!
Gelain
No way . Am 100% sure measure and cal column should allow filter.
one question for do u using any Live connection ?
@Baskar- you are correct that a measure will allow FILTER() function within CALCULATE().
However I believe the suggestion from @tringuyenminh92 will not produce the desired results because it uses an AND (&&) clause and should use an OR ( || ) clause.
So either formula should work in most situations.
Query = CALCULATE ( [Valores Totais], FILTER ( Sintetico, Sintetico[Tipo] = "Outros" || Sintetico[Tipo] = "Receitas" ) )
Query = CALCULATE ( [Valores Totais], Sintetico[Tipo] = "Outros" || Sintetico[Tipo] = "Receitas" )
Try this one
Query =
CALCULATE (
[Valores Totais],
OR (Sintetico[Tipo] = "Outros" , Sintetico[Tipo] = "Receitas")
)
It is not solve your prob share some sample data
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |