Slicer with conditions - if value selected select related values

0 votes

slicer with conditions - if value selected, select related values:

I have 2 tables

table 1 - list of all codes

code id,  code text

table 2 with patient details

patientname, admissiondate, discharge date, codeid,codetext

 (3rd table / new requirement)

3rd table contains 4 columns

in slicer when u select a code from table 3

it needs to filter that code and filter other external cause codes as shown in table 3

for example, if you select j96.0 it needs to select j96.0 and other external codes x41,x42,y11 and y12

in another scenario if i26.0 is selected then just select all records related to code i26.0 only(  no associated codes to select)

Nov 12, 2020 in Power BI by anonymous
• 10,480 points
3,560 views

1 answer to this question.

0 votes

I assume that both tables are unrelated so create the following measure:

filter =
IF (
    SELECTEDVALUE ( 'Codes'[code id] ) IN VALUES ( 'Requirements'[code] )
        || SELECTEDVALUE ( 'Codes'[code id] ) IN VALUES ( 'Requirements'[external codes] );
    "Symptom"
)

Now you can use this column to filter out other visualizations.

answered Nov 12, 2020 by Gitika
• 65,770 points

Related Questions In Power BI

+1 vote
1 answer

Have column with multiple values in powerBI, for use with a slicer in power bi

It can be achieved depending on the result you ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,520 points
7,650 views
0 votes
1 answer

Filling Missing Values with the Previous Available Value in Power Query

This guide for filling missing values with ...READ MORE

answered Mar 5 in Power BI by anonymous
• 19,330 points
41 views
0 votes
1 answer

How can I create a dynamic date range filter that automatically adjusts based on user-selected slicer values?

To create a dynamic date range filter ...READ MORE

answered 6 days ago in Power BI by anonymous
• 19,330 points
53 views
0 votes
1 answer

Calculated column with the sum of values from many columns in a row

Hi, You can create a new column by ...READ MORE

answered Mar 14, 2019 in Power BI by Cherukuri
• 33,030 points
2,797 views
0 votes
1 answer

How to connect to data with PowerBI desktop?

With Power BI Desktop, you can connect ...READ MORE

answered Oct 27, 2020 in Power BI by Rajiv
• 8,870 points
775 views
0 votes
1 answer

How to create a Measure using Power BI DAX?

The following steps make your task simple ...READ MORE

answered Oct 27, 2020 in Power BI by Gitika
• 65,770 points
1,123 views
0 votes
1 answer

Error occurred. Unable to load drag and drop problem.

You can solve this by logging in to ...READ MORE

answered Nov 16, 2020 in Power BI by Gitika
• 65,770 points
911 views
+1 vote
1 answer

display the count of rows matching some criteria

Do you want to show a table ...READ MORE

answered Aug 5, 2019 in Power BI by anonymous
• 33,030 points
1,481 views
0 votes
1 answer

Custom Slicer with two calendar date pickers and custom periods?

This exact look and feel are not ...READ MORE

answered Nov 12, 2020 in Power BI by Gitika
• 65,770 points
1,291 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP