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
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
Super User
Super User

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
Super User
Super User

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
 

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
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.