Forum Discussion
Using if condition in New measure in a table visual
Hi, Abhi_2022 ;
I have some confusion about your description, can you take a simple scene or example, and hope to output the results? With logic.
please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-yalanwu-msft
Thanks for the response.
Following is the sample of the table visual I get after selecting a particular region on map or slicer. Now, I don't want all 18 columns to be displayed. I just want those columns which contain values "Very High", "Relatively High" and "Relatively Moderate".
These columns may differ depending on the region I select. For example, in Florida there is no risk of Avalanches at all. So the value for AVLN_RISKR will be NA_NR_ID (NULL basically). Similarly, there are some other risks that are not relevant to Florida, and they will show "NA_NR_ID" values or "Very Low". Therefore, I want to show only the columns relevant to that region and not all 18 columns. Please let me know if you have any questions.
| zip | AVLN_RISKR | CFLD_RISKR | CWAV_RISKR | DRGT_RISKR | ERQK_RISKR | HAIL_RISKR | HRCN_RISKR | HWAV_RISKR | ISTM_RISKR | LNDS_RISKR | LTNG_RISKR | RFLD_RISKR | SWND_RISKR | TRND_RISKR | TSUN_RISKR | VLCN_RISKR | WFIR_RISKR | WNTW_RISKR |
| 12836 | Relatively High | NR_NA_ID | Relatively Low | NR_NA_ID | Relatively Low | Relatively Low | Relatively Low | Relatively High | Relatively Moderate | Relatively High | Relatively High | Relatively High | Relatively Low | Relatively Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 12853 | Very High | NR_NA_ID | Relatively Moderate | NR_NA_ID | Relatively Low | Very Low | Very Low | Relatively Moderate | Relatively Low | Relatively Moderate | Relatively High | Relatively Moderate | Relatively Low | Relatively Low | Very High | NR_NA_ID | Very Low | Relatively Low |
| 12861 | Relatively High | NR_NA_ID | Relatively Low | NR_NA_ID | Relatively Low | Relatively Low | Relatively Low | Relatively High | Relatively Low | Relatively High | Relatively High | Relatively High | Relatively Low | Relatively Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 12911 | Relatively High | NR_NA_ID | Relatively Low | NR_NA_ID | Relatively Low | Relatively Low | Very Low | NR_NA_ID | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Moderate | Relatively Low | Very Low | Very High | NR_NA_ID | Very Low | Relatively Low |
| 12912 | Relatively High | NR_NA_ID | Relatively Low | NR_NA_ID | Relatively Low | Very Low | Very Low | NR_NA_ID | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Moderate | Relatively Low | Very Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 12913 | Relatively High | NR_NA_ID | Relatively Moderate | NR_NA_ID | Relatively Low | Very Low | Very Low | NR_NA_ID | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Moderate | Relatively Low | Very Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 12972 | Very High | NR_NA_ID | Relatively Low | NR_NA_ID | Relatively Low | Relatively Low | Very Low | NR_NA_ID | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Moderate | Relatively Low | Very Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 12983 | Relatively High | NR_NA_ID | Relatively Moderate | NR_NA_ID | Relatively Low | Very Low | Very Low | NR_NA_ID | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Moderate | Relatively Low | Very Low | Very High | NR_NA_ID | Relatively Low | Relatively Moderate |
| 12989 | Relatively High | NR_NA_ID | Relatively Low | NR_NA_ID | Relatively Low | Very Low | Very Low | NR_NA_ID | Relatively Moderate | Relatively High | Relatively Low | Relatively Moderate | Relatively Low | Very Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 16652 | Very High | NR_NA_ID | Relatively Low | NR_NA_ID | Very Low | Very Low | Relatively Low | NR_NA_ID | Very Low | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Moderate | Relatively Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 16666 | Relatively High | NR_NA_ID | Relatively Moderate | NR_NA_ID | Very Low | Very Low | Relatively Low | NR_NA_ID | Very Low | Relatively Moderate | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Low | Very High | NR_NA_ID | Very Low | Relatively Moderate |
| 16686 | Very High | NR_NA_ID | Relatively Moderate | NR_NA_ID | Very Low | Very Low | Relatively Low | NR_NA_ID | Very Low | Relatively Moderate | Relatively Moderate | Relatively Moderate | Relatively Low | Relatively Low | Very High | NR_NA_ID | Relatively Moderate | Relatively Moderate |