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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Tribunal
Regular Visitor

Exclude results in a visual

New Power BI user here.  I've searched and found many topics about my issue but nothing seems to work (most likely I'm not understanding the logic needed).

 

I am working with vulnerability feeds.  I have a table that includes all vulnerabilities.  I have a visual already named "Vulnerabilities by Severity" that shows me how many are Critical, High, etc. of the whole population.

 

But now I'd like to create the same visual but exclude any row where the data in the DeviceName column starts with xyz-. 

 

In other words, if the table looks like this:

DeviceNameDescriptionSeverity
Device1asdfHigh
Device2asdfHigh
xyz-Device3asdfHigh
Device4asdfHigh

 

I'd like a visual (for example, a Card) that would show the number of High vulnerabilities is 3, since row 4 starts with xyz-.

 

I know this is very basic.  When I'm new to something like this, it can take me a while to figure out the overall logic.  But once I get that ah-ha moment, I tend to be able to build on it and fire on all cylinders.  I just can't get that ah-ha moment right now no matter how many forums and YT videos I keep reviewing.  Most of them give me steps that it takes knowing BI jargon and I'm very new to this.

 

Thank you for any help, even if it's just teaching me to fish.

3 ACCEPTED SOLUTIONS
Syk
Super User
Super User

You can create a filter for the visual.

Syk_0-1715620071588.png

If you need a card with the same filtering, you can set a filter to a card or just copy/paste the table and set it as a card instead.

Syk_1-1715620142763.png

You could also set another visual level filter to say only where severity is high to narrow it down further (when you add more data).

View solution in original post

_AAndrade
Super User
Super User

Hi @Tribunal,

Here is my solution:

Count High = 
CALCULATE(
    COUNTROWS(T_Severity),
    FILTER(
        ALL(T_Severity),
        T_Severity[Severity]="High" && LEFT(T_Severity[DeviceName],4) <> "xyz-"
    )
)




Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




View solution in original post

HotChilli
Super User
Super User

Create the card.  Drag a field on to the card and select your aggregation (or create your own measure and put that on).

Drag DeviceName into the Filters pane where it says 'Add data fields here'. Select Advanced Filtering and 'does not start with', put xyz in here

View solution in original post

4 REPLIES 4
Tribunal
Regular Visitor

Thank you all!  I tried to mark all three as the solution because they all helped (I even used the query to help with another issue).

 

I knew it would be something basic but just learning that helped me complete my whole dashboard.  Thank you all!

HotChilli
Super User
Super User

Create the card.  Drag a field on to the card and select your aggregation (or create your own measure and put that on).

Drag DeviceName into the Filters pane where it says 'Add data fields here'. Select Advanced Filtering and 'does not start with', put xyz in here

_AAndrade
Super User
Super User

Hi @Tribunal,

Here is my solution:

Count High = 
CALCULATE(
    COUNTROWS(T_Severity),
    FILTER(
        ALL(T_Severity),
        T_Severity[Severity]="High" && LEFT(T_Severity[DeviceName],4) <> "xyz-"
    )
)




Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Syk
Super User
Super User

You can create a filter for the visual.

Syk_0-1715620071588.png

If you need a card with the same filtering, you can set a filter to a card or just copy/paste the table and set it as a card instead.

Syk_1-1715620142763.png

You could also set another visual level filter to say only where severity is high to narrow it down further (when you add more data).

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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