Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors