cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
m-warrell
Regular Visitor

Help with Filtering Multiple Data Values

Hi everyone,

 

I'm a bit new to Power BI and I'm having trouble replicating a Pivot Table from Excel to Power BI. I need to count the number of times a specific filter is met for each of the management areas I have in a data set. I need to filter the accessibility column by "Accessible by Line Truck", "Not Accessible by Line Truck", and any blanks in this column. Along with meeting the previous requirements, the filter needs to filter the owner column to only show "FPL Distribution", filter the recommended restoration method column to only show the blank values, and filter the reject pole column to only show the "True" values. 

 

I was able to write out the logic that I think makes sense (see first image below), but this data then shows all of the values for each management area when I add it as a count function to the values part of the table (see second image below). I'm not sure how to correct this since I know not all of the data meets these filters. Power BI logic.jpg

count not working.jpg

 

Any help would be greatly appreciated as I have searched for answers and tried to get this to work for some time now.

1 ACCEPTED SOLUTION
selimovd
Community Champion
Community Champion

Hey @m-warrell ,

 

for me it looks like you added the measure as a calculated column in the data model.

I think what you want is to create it as a measure. Could that be? Try it as a measure instead of calculated column and see if that fits.

 

By the way, do the rows really contain the text "(blank)" or are they blank? If they are just blank you have to check "myTable[myColumn] = BLANK()".

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
selimovd
Community Champion
Community Champion

Hey @m-warrell ,

 

for me it looks like you added the measure as a calculated column in the data model.

I think what you want is to create it as a measure. Could that be? Try it as a measure instead of calculated column and see if that fits.

 

By the way, do the rows really contain the text "(blank)" or are they blank? If they are just blank you have to check "myTable[myColumn] = BLANK()".

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

This worked perfectly! The only thing I want to edit for other people who may potentially use a similar solution is I had to change my code that contained True and False in a new column to T and F as this isn't allowed in a DAX comparison operation. The code that I used is:

New Reject Pole = IF('Osmose Report Data'[Reject Pole] = TRUE(), "T","F")
and then replaced the True code above with: 
&& 'Osmose Report Data'[New Reject Pole] = "T"

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors