Forum Discussion
Remove rows (in visualization) with no values in several columns
Hi,
my table has a lot of zero in several columns:
| STOCK IT | STOCK FR | STOCK US | |
| SHOES | 10 | 0 | 0 |
| SHIRT | 0 | 14 | 0 |
| HAT | 0 | 0 | 22 |
| GLASSES | 0 | 0 | 0 |
| TIE | 33 | 66 | 0 |
| SOCKS | 0 | 0 | 45 |
| BELT | 0 | 0 | 0 |
How can I obtain the following result in visualization?
| STOCK IT | STOCK FR | STOCK US | |
| SHOES | 10 | 0 | 0 |
| SHIRT | 0 | 14 | 0 |
| HAT | 0 | 0 | 22 |
| TIE | 33 | 66 | 0 |
| SOCKS | 0 | 0 | 45 |
I need to keep only rows with at least one value on several columns.
thank you very much
Paolo
Hi, paolomint
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control = var _result = CALCULATE( SUM('Table'[Value]), ALLEXCEPT('Table','Table'[Category]) ) return IF( _result>0, 1,0 )Then you need to put the measure in the visual level filter to get the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
8 Replies
- Fowmy
Super User
- Fowmy
Super User
- v-alq-msft
Community Support
Hi, paolomint
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control = var _result = CALCULATE( SUM('Table'[Value]), ALLEXCEPT('Table','Table'[Category]) ) return IF( _result>0, 1,0 )Then you need to put the measure in the visual level filter to get the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.