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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
asjones
Helper V
Helper V

DAX - All() Not working when FILTER() also used

I have the following DAX code that is close, but the ALL() is not removing the filters on Period_GL.

    CALCULATE (
        [LOA - Original Budget - NO IDC CO-DO]
        , ALL( Period_GL )
        , Filter( 'Main Project Master File - PMF' , [Main Project Active] = 1 )
    )
 
If I remove the FILTER() then the code with the ALL() works
 CALCULATE (
        [LOA - Original Budget - NO IDC CO-DO],
                    ALL ( Period_GL )
        )
I don't like the FILTER() in the calculate, but ran into errors when I did not have that and needed a dynamic check for "active".
 
Any ideas or suggestions? Love to hear differnet thoughts.
 
thanks
 
Alan
 
6 REPLIES 6
parry2k
Super User
Super User

@asjones I think you need to read my previous reply and answer the questions if you need help.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

i thought i had posted enough, but realize my question is still confusing ... i will pull my question and try and repost it with more details. I was worried all the details would make it more confusing and people would not read it.

 

thanks for trying

 

parry2k
Super User
Super User

@asjones I guess you are good now.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2ksorry for the confusion... it is not working I did 1=1 as a test only, but i need the filter [Main Project Active] = 1  in three like the oringal example.

i pasted what the measure was so you could see it.

 

asjones
Helper V
Helper V

@parry2k 

Great question, I was focusted on the FILTER() and did not look closer. For  a quick test I changed the FILTER() line to

, Filter( 'Main Project Master File - PMF' , 1= 1 )
and my results were correct.... the ALL() removed the slicers I had on the page.
 
The measure Main Project Actiive is this... (it is ugly, but we have screwy data).
Main Project Active =
VAR __Period_Selected = SELECTEDVALUE ( Period_GL[Period] )
VAR __FY_Year_of_Perid_Selected = LEFT ( __Period_Selected, 4 )
VAR __Period_Begining_of_FY = VALUE ( __FY_Year_of_Perid_Selected & "00" )
VAR __Period_End_of_FY = VALUE ( __FY_Year_of_Perid_Selected & "13" )

RETURN
if( CALCULATE( [Programmatic Actuals (with IDC)] + [Prog Working Bud Select FY no IDC]  +  [Board Budget (USD)] + [LOA - Original Budget with IDC CO-DO] ,
        ALL ( Period_GL ),
         __Period_Begining_of_FY <= Period_GL[Period]
          && __Period_End_of_FY >= Period_GL[Period]
    ) <> 0  , 1 , 0)
 
 
parry2k
Super User
Super User

@asjones can you share the relationship diagram, and also the measure definition?  Also, it will good to know what is not working, and some sort of screenshots explaining the problem.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.