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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arashaga
Helper I
Helper I

Show bar charts after selecting multiple slicers

I have a little dillema with my viz. I would like to show the bar chart when both my slicers are selected; the first one is Step1 and second is Step 2. For that I created a DAX function called ADD_Filter_Condition as below

 

ADD_Filter Condition = if (ISFILTERED(SEEKUT_CENSUS_WAGE_MAJ_LOAN_REV[osi_cip_4_title]) && HASONEFILTER(SEEKUT_CENSUS_WAGE_MAJ_LOAN_REV[Inst_Name0]), "Yes", "No")

And I added that to the filter and filtered to yes as shown below3.PNG

 

 

so when the filter condition is yes to show the bar chart. Otherwise show a message that you need to select both filters. There is another measure there that checks to see if the filter condition is Yes then it shows the message as shown below. ( it shows the below message when I select Step 1 only or select none which is ok)

1.PNG

 

But the problem is here. It works when I select Step 1 and not Step 2 or not selecting Steps1 and Step 2 but it doesn’t work when I only select Step two ( look at the last screenshot it shows everything and the message). What I am going wrong here?

 

2.PNG

 

 

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@arashaga,

 

From the measure you provided, it seems like the two slicers are based on two columns in the same table, so one filter may filter another columns, to be general, you may modify your measure using dax below;

ADD_Filter Condition =
IF (
    ISFILTERED ( SEEKUT_CENSUS_WAGE_MAJ_LOAN_REV[osi_cip_4_title] )
        && ISFILTERED ( SEEKUT_CENSUS_WAGE_MAJ_LOAN_REV[Inst_Name0] ),
    "Yes",
    "No"
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@arashaga,

 

From the measure you provided, it seems like the two slicers are based on two columns in the same table, so one filter may filter another columns, to be general, you may modify your measure using dax below;

ADD_Filter Condition =
IF (
    ISFILTERED ( SEEKUT_CENSUS_WAGE_MAJ_LOAN_REV[osi_cip_4_title] )
        && ISFILTERED ( SEEKUT_CENSUS_WAGE_MAJ_LOAN_REV[Inst_Name0] ),
    "Yes",
    "No"
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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