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
Anonymous
Not applicable

How to Use ALL or ALLEXCEPT with RELATED table columns as filters

Hi,

 

I wonder if you can help. I am looking to create a bar chart that displays information from 2 tables... table 1 and table 2, the x axis being the "month-year" of a date look up table.

 

The data from table 2 is a simple count but from table 1 I want to layer on conditions to be a count for only two statuses.

I can't seem to figure out the allexcept for a related table.. the below is what I have got so far. Can anyone shed some light on this?

 

=CALCULATE([Number Of Learners],

 

filter(ALLEXCEPT(Table1, 'Calendar'[Month-year]),

 

                     OR('Table1'[Status] = "Achiever",'Table1'[Status] = "Cancelled")))

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi PollyHalton50,

Did you want to get below result?

243.PNG

You could try below measure(create a relationship between two tables)

Measure =
CALCULATE (
    COUNT ( 'Table'[status] ),
    FILTER ( ( 'Table' ), 'Table'[status] = "a" || 'Table'[status] = "b" )
)

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
dax
Community Support
Community Support

Hi PollyHalton50,

Did you want to get below result?

243.PNG

You could try below measure(create a relationship between two tables)

Measure =
CALCULATE (
    COUNT ( 'Table'[status] ),
    FILTER ( ( 'Table' ), 'Table'[status] = "a" || 'Table'[status] = "b" )
)

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.