Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Abhi_2022
Frequent Visitor

Using if condition in New measure in a table visual

Hi,
There are 18 columns and each columns has at max 5 categorical values. After selecting a particular zip code I want to show only those columns and their values which are of certain categorical value. So, basically I want to filter or put condition and show only those columns  in the table visualization that satifies the condition. I guess I need to create a measure for this but not sure how to approach it. if anyone could guide it will be helpful.
Thanks!

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

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.

zipAVLN_RISKRCFLD_RISKRCWAV_RISKRDRGT_RISKRERQK_RISKRHAIL_RISKRHRCN_RISKRHWAV_RISKRISTM_RISKRLNDS_RISKRLTNG_RISKRRFLD_RISKRSWND_RISKRTRND_RISKRTSUN_RISKRVLCN_RISKRWFIR_RISKRWNTW_RISKR
12836Relatively HighNR_NA_IDRelatively LowNR_NA_IDRelatively LowRelatively LowRelatively LowRelatively HighRelatively ModerateRelatively HighRelatively HighRelatively HighRelatively LowRelatively LowVery HighNR_NA_IDVery LowRelatively Moderate
12853Very HighNR_NA_IDRelatively ModerateNR_NA_IDRelatively LowVery LowVery LowRelatively ModerateRelatively LowRelatively ModerateRelatively HighRelatively ModerateRelatively LowRelatively LowVery HighNR_NA_IDVery LowRelatively Low
12861Relatively HighNR_NA_IDRelatively LowNR_NA_IDRelatively LowRelatively LowRelatively LowRelatively HighRelatively LowRelatively HighRelatively HighRelatively HighRelatively LowRelatively LowVery HighNR_NA_IDVery LowRelatively Moderate
12911Relatively HighNR_NA_IDRelatively LowNR_NA_IDRelatively LowRelatively LowVery LowNR_NA_IDRelatively ModerateRelatively ModerateRelatively LowRelatively ModerateRelatively LowVery LowVery HighNR_NA_IDVery LowRelatively Low
12912Relatively HighNR_NA_IDRelatively LowNR_NA_IDRelatively LowVery LowVery LowNR_NA_IDRelatively ModerateRelatively ModerateRelatively LowRelatively ModerateRelatively LowVery LowVery HighNR_NA_IDVery LowRelatively Moderate
12913Relatively HighNR_NA_IDRelatively ModerateNR_NA_IDRelatively LowVery LowVery LowNR_NA_IDRelatively ModerateRelatively ModerateRelatively LowRelatively ModerateRelatively LowVery LowVery HighNR_NA_IDVery LowRelatively Moderate
12972Very HighNR_NA_IDRelatively LowNR_NA_IDRelatively LowRelatively LowVery LowNR_NA_IDRelatively ModerateRelatively ModerateRelatively LowRelatively ModerateRelatively LowVery LowVery HighNR_NA_IDVery LowRelatively Moderate
12983Relatively HighNR_NA_IDRelatively ModerateNR_NA_IDRelatively LowVery LowVery LowNR_NA_IDRelatively ModerateRelatively ModerateRelatively LowRelatively ModerateRelatively LowVery LowVery HighNR_NA_IDRelatively LowRelatively Moderate
12989Relatively HighNR_NA_IDRelatively LowNR_NA_IDRelatively LowVery LowVery LowNR_NA_IDRelatively ModerateRelatively HighRelatively LowRelatively ModerateRelatively LowVery LowVery HighNR_NA_IDVery LowRelatively Moderate
16652Very HighNR_NA_IDRelatively LowNR_NA_IDVery LowVery LowRelatively LowNR_NA_IDVery LowRelatively ModerateRelatively ModerateRelatively LowRelatively ModerateRelatively LowVery HighNR_NA_IDVery LowRelatively Moderate
16666Relatively HighNR_NA_IDRelatively ModerateNR_NA_IDVery LowVery LowRelatively LowNR_NA_IDVery LowRelatively ModerateRelatively ModerateRelatively ModerateRelatively LowRelatively LowVery HighNR_NA_IDVery LowRelatively Moderate
16686Very HighNR_NA_IDRelatively ModerateNR_NA_IDVery LowVery LowRelatively LowNR_NA_IDVery LowRelatively ModerateRelatively ModerateRelatively ModerateRelatively LowRelatively LowVery HighNR_NA_IDRelatively ModerateRelatively Moderate

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.