Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi guys,
I hope you're doing fine !
I have a table that I must keep only lines if the products belong to differents specific categories and I would want to apply this filter in the CALCULATE filter part : Calculate( AVG(Price) ,....here.....)
Ideally, I should keep the products if the text of its differents Categories at differents lines contain "Unity...." and "Sub Unity..."
You can see the result as below
We should do the average only for A and F cause its has differents categories
Thank you very much !
Solved! Go to Solution.
Hi @Anonymous
when you want to filter the table in that visual, you can try
Measure = CALCULATE(DISTINCTCOUNT('Table'[Category]),ALLEXCEPT('Table','Table'[Product]))
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
when you want to filter the table in that visual, you can try
Measure = CALCULATE(DISTINCTCOUNT('Table'[Category]),ALLEXCEPT('Table','Table'[Product]))
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Try this...
CALCUALTE(
AVG(Price) ,
OR(
CONTAINSSTRING(Table[Category], "Unity"),
CONTAINSSTRING(Table[Category], "Sub Unity")
)
)
Hi
I tried it and it do the average for every product and we should calculate only for the product A and F which has differents categories
@Anonymous
Try this. This doesn't work, you'll need to share data...
VAR CurrentValue = SELECTEDVALUE(Table[Category])
RETURN
CALCUALTE(
AVG(Price) ,
OR(
CONTAINSSTRING(CurrentValue, "Unity"),
CONTAINSSTRING(CurrentValue, "Sub Unity")
)
)