Forum Discussion
Tahech
4 years agoHelper I
Dynamic filter using CALCULATE and CONTAINSSTRING
Hi guys, I created the following measure:
(some variables are in Portuguese/BR)
- Número de Card Tahech = CALCULATE(count(main[Empresa]), filter(main, CONTAINSSTRING(main[Empresa], "Tahech")))
- Número de Cards Vuello = CALCULATE(count(main[Empresa]), filter(main, CONTAINSSTRING(main[Empresa], "Vuello")))
The 1 returned 64 and the 2, returned 47.
Then I use both values to create a Clustered Bar Graph.
When I click over any bar, it DOES NOT filter any value in the rest of the report. I'd like to create the same numbers but be able to filter the report dynamically. For example, click over the 64 bar, and the rest of the report shows ONLY the 64 data inside this "class".
How can I do the same thing I did, but at the same time being able to filter the report dynamically?
Hi Tahech ,
I can understand your requirement, but this functionaly is not available in Power BI yet.The best pracitse is to use slicer,refer the below:
Measure3 = CALCULATE(count(main[Empresa]), ALLSELECTED(main),FILTER(main,main[Empresa]=MAX(main[Empresa])))Then create visual ,and silicer:
And you could use slicer to filter all the report:
Did I answer your question? Mark my post as a solution!
Best RegardsLucien
1 Reply
- v-luwang-msftCommunity Support
Hi Tahech ,
I can understand your requirement, but this functionaly is not available in Power BI yet.The best pracitse is to use slicer,refer the below:
Measure3 = CALCULATE(count(main[Empresa]), ALLSELECTED(main),FILTER(main,main[Empresa]=MAX(main[Empresa])))Then create visual ,and silicer:
And you could use slicer to filter all the report:
Did I answer your question? Mark my post as a solution!
Best RegardsLucien