Forum Discussion
Filtro por VALOR ou QUANTIDADE
- 5 years ago
Hi PedroAliança
Do you use the switch measure in the table visual, line chart visual and bar chart visual? I think it is because these charts expect numeric values to display whereas the measure returns Text type value when using Format function.
Using Calculation Groups may help solve this. I remembered I read a post earlier which used calculation groups to switch the format without changing data types, but I haven't used that before. You may first read Dynamic Formatting of Switch Measures - Excelerator BI and try this method.
Sorry for not providing a solid solution. I will try my best to find another option.
Regards,
Jing
Bom dia, Jing!
Obrigado pela resposta e ótimas indicações.
Mudei o método, estou utilizando somente uma base e agora estou fazendo por SWITCH.
Medidas =
SWITCH(
'Selecao Medidas'[Medida Selecionada],
1,[Valor],
2,[Quantidade]
)
Quando utilizo esse código, não está puxando a formatação, mas a tabela funciona perfeitamento com os filtros. Segue foto:
Medidas =
SWITCH(
'Selecao Medidas'[Medida Selecionada],
1, FORMAT([Valor], "currency"),
2, FORMAT([Quantidade], "general number")
)
Quando eu utilizo este código com o FORMAT, funciona a formatação porém puxa valores em branco, e não funcionam os gráficos. Segue foto:
Já tentei filtrar: "Não está em branco", "Não está vazio" "Maior que 0". Nada funcionou. Apesar do filtro de data (lado esquedo superior) funcionar, aparecem os campos em branco. Valor total está certo.
Desde já, muito obrigado.
Hi PedroAliança
Do you use the switch measure in the table visual, line chart visual and bar chart visual? I think it is because these charts expect numeric values to display whereas the measure returns Text type value when using Format function.
Using Calculation Groups may help solve this. I remembered I read a post earlier which used calculation groups to switch the format without changing data types, but I haven't used that before. You may first read Dynamic Formatting of Switch Measures - Excelerator BI and try this method.
Sorry for not providing a solid solution. I will try my best to find another option.
Regards,
Jing
- PedroAliança5 years agoFrequent Visitor
Hi Jing!
Eu fiz esse metódo pelo Tabular Editor e funcionou perfeitamente!
Muito obrigado pela ajuda!
- v-jingzhang5 years ago
Community Support
That's great! Cheers!