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
sagi_b
Helper I
Helper I

new measure with new filter but with no page filter

I want to create a DAX measure that base on specific filters but remove specific page filter

 

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @sagi_b ,

 

For your description, my suggestion could be to use functions such as all, alexcept, etc. In the test below, remove the external filter and keep only the selected filter of calendar year.

 

M1_ =
CALCULATE (
    SUM ( 'Table'[Quantity] ),
    ALLEXCEPT ( 'Table', 'Table'[Calendar Year] )
)
M2_ =
CALCULATE (
    SUM ( 'Table'[Quantity] ),
    FILTER (
        ALL ( 'Table' ),
        MAX ( 'Table'[Calendar Year] ) = 'Table'[Calendar Year]
    )
)

 

vhenrykmstf_0-1633571955832.png

 

For more details, you can read related blog as below:

How to use ALL and ALLEXCEPT Functions in Power BI DAX | Microsoft Power BI Kingdom (excelkingdom.bl...

The (ALL, ALLSELECTED & ALLEXCEPT) Code - Microsoft Power BI Community


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @sagi_b ,

 

For your description, my suggestion could be to use functions such as all, alexcept, etc. In the test below, remove the external filter and keep only the selected filter of calendar year.

 

M1_ =
CALCULATE (
    SUM ( 'Table'[Quantity] ),
    ALLEXCEPT ( 'Table', 'Table'[Calendar Year] )
)
M2_ =
CALCULATE (
    SUM ( 'Table'[Quantity] ),
    FILTER (
        ALL ( 'Table' ),
        MAX ( 'Table'[Calendar Year] ) = 'Table'[Calendar Year]
    )
)

 

vhenrykmstf_0-1633571955832.png

 

For more details, you can read related blog as below:

How to use ALL and ALLEXCEPT Functions in Power BI DAX | Microsoft Power BI Kingdom (excelkingdom.bl...

The (ALL, ALLSELECTED & ALLEXCEPT) Code - Microsoft Power BI Community


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

amitchandak
Super User
Super User

@sagi_b , Try all(Table[Column]) or   Removefilters(Table[Column])  in a measure and check

CALCULATE(DISTINCTCOUNT(factCyclesStatus[cycle_id]),FILTER(factCyclesStatus,factCyclesStatus[new_status]="pending"),FILTER(dimCycleDate,dimCycleDate[total_seconds]>0),REMOVEFILTERS(dimCycleDate,dimCycleDate[cycle_date]))
 
its not working together ( filter and remove filters)

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.