Forum Discussion
Dynamic card value based on other visuals
I'm currently working on a report that has a shape map, a matrix and a card. The card displays the region that has been selected on the map. The table shows companies. I am needing the card to update based on whether one of the other visuals is interacted with, like so:
1. If nothing is selected (ie. nothing in the matrix is selected and no region on the map is selected) then the card reads "All"
2. If a region is selected then the card displays the name of the region.
3. If multiple regions are selected on the map or a company that is present in multiple regions is selected in the matrix, then the card reads "Multiple".
I have the following measure:
Hi Anonymous ,
You can try this measure:
Measure = VAR y = CALCULATE ( DISTINCTCOUNT ( 'Table'[Region] ), ALLSELECTED ( 'Table' ) ) VAR x = IF ( NOT ISFILTERED ( 'Table'[Region] ) && NOT ISFILTERED ( 'Table'[Company] ), "All", IF ( HASONEVALUE ( 'Table'[Region] ), VALUES ( 'Table'[Region] ), IF ( y > 1, "Multiple" ) ) ) RETURN xnothing is selected
one region is selectedcompany in multi regionsselect multi regions
Sample file is attached that hopes to help you, please check and try it: Dynamic card value based on other visuals.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-yingjlCommunity Support
Hi Anonymous ,
You can try this measure:
Measure = VAR y = CALCULATE ( DISTINCTCOUNT ( 'Table'[Region] ), ALLSELECTED ( 'Table' ) ) VAR x = IF ( NOT ISFILTERED ( 'Table'[Region] ) && NOT ISFILTERED ( 'Table'[Company] ), "All", IF ( HASONEVALUE ( 'Table'[Region] ), VALUES ( 'Table'[Region] ), IF ( y > 1, "Multiple" ) ) ) RETURN xnothing is selected
one region is selectedcompany in multi regionsselect multi regions
Sample file is attached that hopes to help you, please check and try it: Dynamic card value based on other visuals.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.