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,467 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,487 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,684 views
0 votes
1 answer

Chart with only some values in field in a graph in power BI?

Hi Banu, While creating a chart, put the ...READ MORE

answered Apr 10, 2019 in Power BI by Cherukuri
• 33,030 points
989 views
0 votes
1 answer

Datediff with column having no value/ blank

Hi Karthick, Use the below DAX code - ...READ MORE

answered May 8, 2019 in Power BI by Cherukuri
• 33,030 points
6,062 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
705 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,046 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
823 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,336 views
+2 votes
3 answers

How to replace null values with custom values in Power BI(power query editor)?

Hi Nithin, To fill or replace the null or ...READ MORE

answered Mar 8, 2019 in Power BI by Cherukuri
• 33,030 points
160,212 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,215 views
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