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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Daniel_Derbin
Frequent Visitor

Filter while using ALLEXCEPT

Hi,

I have an issue with creating one DAX measure, hope some of you could help here.

The task is to show % spread of vulnerabilities but with aggregation of 100% per type of Severity.

Daniel_Derbin_0-1664182636095.png

 

Used measure:

% of vuln wo Sev =

 

    CALCULATE(

        IF(

            DIVIDE([Number of Vulnerabilities],[Sum of vulnerabilities wo sev],0) = BLANK(),

            0,

            DIVIDE([Number of Vulnerabilities],[Sum of vulnerabilities wo sev],0)

        )

    )

 

And underlying measures are:
Number of Vulnerabilities = count('TSCDB_Prod LIVE'[ID])

 

 

Sum of vulnerabilities wo sev =

 

    CALCULATE(

        [Number of Vulnerabilities],

        ALLEXCEPT('TSCDB_Prod LIVE','TSCDB_Prod LIVE'[Severity]),

        'TSCDB_Prod LIVE'[Closed status] = "Open"

    )

 

 

As you see this measure works as intended but issue appears when I try to add organization dimension as a filter:

Without ORG filter:

 

Daniel_Derbin_1-1664182636103.png

 

 

With applied filter Number of Vulnerabilities changes but Sum of Vuln wo SEV remains the same and that affects % of Vuln wo Sev as it should still calculate 100% based on selection.

 

Daniel_Derbin_2-1664182636108.png

 

 

Any idea how to get around issue to have Sum of vuln wo Sev be able to react to filtering?

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Daniel_Derbin 

Please try this measure :

Sum of vulnerabilities wo sev =
 CALCULATE(
        [Number of Vulnerabilities],  
        FILTER('TSCDB_Prod LIVE',[Severity]=MAX('TSCDB_Prod LIVE'[Severity]) &&
         'TSCDB_Prod LIVE'[Closed status] = "Open"
    ))

Because you are using allexcept here , the filter in slicer does not work for the return value of this measure .

ALLEXCEPT function (DAX) - DAX | Microsoft Learn 

 

Best Regards,
Community Support Team _ Ailsa Tao

HI Ailsa,

Thank you for your feedback, it didn't do the trick sadly.
Measure is now filtering through slicer but gives same result as Number of Vuln.



Daniel_Derbin_0-1664267331889.png

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.