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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Keep multiple filters in Measure

I feel like I'm missing something very obvious. I'm writing a Percent of Grand Total Measure. I have a Slicer and a Filter on my report that I need my denominator to respect in regards to the "Grand Total". When I write my Calculate statement with a single "All Except" the correct total value is returned, when I try to combine both All Excepts, I end up with the actual total of all items (as if there were not filters applied). What am I missing?

 

Measure = DIVIDE(
   VAR AssignedComputers = COUNTDISTINCT('Computers'[SystemName])
   VAR AllSystems = CALCULATE(DISTINCTCOUNT(Computers[System_Name]), 
                        ALLEXCEPT(Computers, Computers[is IT]),
                        ALLEXCEPT(Computers, 'Lumnion Table'[Software_Name])
                    )

RETURN
   DIVIDE(AssignedComputers, AllSystems)
1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 There is no need for two ALLEXCEPT, you can add multiple columns in a single ALLEXCEPT like below.

Measure = 
VAR AssignedComputers = DISTINCTCOUNT( 'Computers'[SystemName] )
VAR AllSystems = 
    CALCULATE(
        DISTINCTCOUNT( Computers[System_Name] ), 
        ALLEXCEPT( Computers, Computers[is IT], 'Lumnion Table'[Software_Name] )
    )
RETURN
   DIVIDE( AssignedComputers, AllSystems )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn



 

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 There is no need for two ALLEXCEPT, you can add multiple columns in a single ALLEXCEPT like below.

Measure = 
VAR AssignedComputers = DISTINCTCOUNT( 'Computers'[SystemName] )
VAR AllSystems = 
    CALCULATE(
        DISTINCTCOUNT( Computers[System_Name] ), 
        ALLEXCEPT( Computers, Computers[is IT], 'Lumnion Table'[Software_Name] )
    )
RETURN
   DIVIDE( AssignedComputers, AllSystems )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn



 

Anonymous
Not applicable

uh.... I did state I thought I was missing something obvious... 🙂

 

Thanks, I did not realize it would take multiple arguements referncing different tables, in hindsight its obvious.

 

Regards,

-Robert

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors