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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II
Helper II

Calculate filter OR

Item Last Cost =
calculate(AVERAGE( Products[last_cost] ),
FILTER(Bi_Balance_All,not(ISBLANK([Units at Stock])))
FILTER(Bi_Basket_all,not(ISBLANK([Basket Uints]))))
what's wrong here?! why i can't use or with this code?!!
Super User
Super User

I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.

Your insights and updates will greatly assist others who might be encountering the same challenge.

Super User
Super User


Share data in a format that can be pasted in an MS Excel file, explain the question and show the expected result.

Ashish Mathur




In the Query Editor, append the 2 tables (call that table Data).  Create a single column table with all unique Names (call this table Names).  Create a many to one relationship from the Data table and Product table to the Names table.  To your visual, drag Name from the Names table.  Write this measure

Measure = if(sum(Data[Balance])=0,blank(),sum(Product[Price]))

Hope this helps.

Ashish Mathur

i can't actullay do that, it's ver complicated cube with alot of relationships, i just tried to simplfy as mush as i can, but iused another measure 


VAR not_in_Scope = not(ISINSCOPE(Products[Item]))
Var Check_ = AND(ISBLANK(count(Bi_Balance_All[ProductID])),ISBLANK(count(Bi_Basket_all[MODEL_ID])))
if(Check_=TRUE() || not_in_Scope = True() ,blank(),AVERAGE(Products[last_cost]))

VAR balance = CALCULATE(AVERAGE(Products[last_cost]), FILTER(Bi_Balance_All,not(isblank([Units at Stock]))))
 VAR basket = CALCULATE(AVERAGE(Products[last_cost]), FILTER(Bi_Basket_all,not(isblank([Basket Uints]))))
 if( isblank(balance) && isblank(basket),blank(),AVERAGE(Products[last_cost])),
they both worked, i juts can't imagine that i can't use or with calculate and filter?!!!!
Super User
Super User

Hi @Amrselim1989 

I can only assume based on your dax that both tables filter the Products table. If this is the case you can try

NOT ISBLANK ( RELATED ( Bi_Balance_All[Units at Stock] ) )
|| NOT ISBLANK ( RELATED ( Bi_Basket_all[Basket Uints] ) )

Super User
Super User

Hi @Amrselim1989 ,

Try this kind of structure:

Measure =
calculate(AVERAGE( 'Table'[Value] ),
FILTER('Table (2)',not(ISBLANK([Units at Stock]) || not(ISBLANK([Basket Uints])))))

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn:

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

no i can't the Basket Uints is coming from another table not table 2


calculate(AVERAGE( 'Table'[Value] ),
FILTER('Table (2)',not(ISBLANK([Units at Stock]) || "here must choose another table (not table 2)"not(ISBLANK([Basket Uints])))))

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.