Forum Discussion
Comments for filters
- Anonymous7 years ago
HI Anonymous ,
You can use following measure formula to achieve your requirement:
Dynamic comment = IF ( COUNTROWS ( EXCEPT ( ALL ( T1[Region Name] ), ALLSELECTED ( T1[Region Name] ) ) ) > 0, CONCATENATEX ( VALUES ( T1[Region Comments] ), [Region Comments], "," ), CONCATENATEX ( VALUES ( T2[Region Comments] ), [Region Comments], "," ) )Notice:
1. T1 is sheet1, T2 is sheet2.
2. Current power bi can't find out the difference between 'all selected' and 'unselected', so measure formula will recognize 'all selected' and 'unselected' as 'unselect'.
Regards,
Xiaoxin Sheng
Hi Anonymous ,
Can you please share some fake data with same data structure and copy them to your post with table format?(copy them to excel, then copy correspond worksheet cell range and paste to your post) It will help for test to coding formula.
Sample:
table1
| Test | Test2 |
| 123 | 231 |
| 123 | 123 |
table2
| Test | Test2 |
| 123 | 231 |
| 123 | 123 |
Regards,
Xiaoxin Sheng
Hi Anonymous
i have 5 region in filter, in Sheet 1.
| Sheet 1 | |
| Region Name | Region Comments |
| A | sfghrfgnhg yhethfbfghgfgyjhmghjfgdh |
| A | dfhrgjdfgxfgchbhhfghnfmkghjhcgxfgbfhgk |
| B | fbjkvdfbv |
| B | sdfvgdfbfg |
| C | svdbfnbfgbh |
| D | fbgghdnfhk,ylhdvgbdf |
| E | sdfgdjhndgbdgf |
In sheet 2,
| Sheet 2 | |
| Region Name | |
| Global | dsvsfvgasdmkfvkgsb f |
| Global | dcakhfgvsrdfjsadhgfv |
I have 5 region, incase if nothing is selected i need Sheet2 global comments in one pragraph,
incase if some region is selected then i need sheet 1 comments for that particular region.
Thanks for your support and help.
Regards,
Nagesh
- Anonymous7 years agoNot applicable
HI Anonymous ,
You can use following measure formula to achieve your requirement:
Dynamic comment = IF ( COUNTROWS ( EXCEPT ( ALL ( T1[Region Name] ), ALLSELECTED ( T1[Region Name] ) ) ) > 0, CONCATENATEX ( VALUES ( T1[Region Comments] ), [Region Comments], "," ), CONCATENATEX ( VALUES ( T2[Region Comments] ), [Region Comments], "," ) )Notice:
1. T1 is sheet1, T2 is sheet2.
2. Current power bi can't find out the difference between 'all selected' and 'unselected', so measure formula will recognize 'all selected' and 'unselected' as 'unselect'.
Regards,
Xiaoxin Sheng