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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Filter Visual by Different Columns

Hi All,

 

I have a table called 'Main Data' which shows data similar to the below:

 

Module No    Owner      Developed      Reviewed     Signed Off

1                         A               Yes                   Yes              No

2                         B               No                    No              No

3                         C               Yes                   Yes              No

4                         D               Yes                   No              No

5                         A               No                   No               No

6                         B               Yes                   Yes              Yes

7                         B               Yes                   Yes              No

etc.

 

I have created a visual which shows the progress of each owner in all 3 columns together (counting all of the 'Yes' responses vs. the Total responses). I have done this by creating 2 measures:

Measure 1 (Current Progress) 

SUMX(
UNION(
    SELECTCOLUMNS('Main Data',"ContainsYES", 'Main Data'[Developed ]),
    SELECTCOLUMNS('Main Data',"ContainsYES", 'Main Data'[Reviewed]),
    SELECTCOLUMNS('Main Data',"ContainsYES", 'Main Data'[Signed off])
)
,IF([ContainsYES] = "YES"10))
 

Measure 2 (Total) = (COUNTROWS('Main Data')*3)

 

Now I want a slicer on the page which can filter the data for only specific columns i.e. only developed or reviewed or signed off. But I have no idea how to implement this in PowerBI. The two ways I have tried so far have failed:

 

1) Using Field Parameters - this doesn't work as Field Parameters cannot replace the relevant data within my measures (parameters in measures is not yet supported in PowerBI)

2) Unpivoting columns - this solution creates chaos with my other metrics and visuals in the dashboard 

 

Could anyone help me please? 

 

Thank you!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Unpivoting is the right thing to do in most cases. See if you can overcome the chaos by adjusting the rest of your report.  

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Unpivoting is the right thing to do in most cases. See if you can overcome the chaos by adjusting the rest of your report.  

Anonymous
Not applicable

Hi, yes you are correct, I managed to overcome this issue through unpivoting the selected columns within a duplicate version of the same dataset (so my other visuals were not affected). Thank you 🙂

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.