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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I'm using a simple cross filter on the tables below. However, not all my products are matching for the three tables (Some appear only in Z_BOMS, other only in Ventes, etc..). This returns an empty value in the table below to the right. I've tried multiple things with "If hasonevalue" and >0 to try to remove it, but the blank keeps showing up. Is there a way to remove it by adding something in the measure ? Thank you
Hi @Anonymous ,
Yes, I agree with @DataInsights , you don't need to use the CROSSJOIN function...
I created the following example for you, it might help you to figure the solution you need...
1) Created a model with 2 fact tables and one Product Dimension, Not all the product have values in both fact tables, e.g. Prudct F only have value in Fact 2 and Product D only have value in FAct1
2) create to basic measures:
3) create a composed measure that will check if the basic measures have value in the context, if not replace the value of the measure by 1 to allow the multiplication.
Hey @Anonymous
can you detail the two measures you are using in the calculation function? i.e., what are the DAX expressions used to calculate [Ventes] and [Qté_Bom]?
Tks, LQ
Hello, here they are. Thank you
@Anonymous,
Is your visual using the Produit field in the dimension table Produits? Visuals should use fields in dimension tables whenever possible.
Proud to be a Super User!
Hello, yes it's from the "Produits" table. Thank you
@Anonymous,
You could try testing for blank before performing the calculation:
Qté_MP =
IF (
NOT ISBLANK ( [Ventes] ) && NOT ISBLANK ( [Qté_Bom] ),
CALCULATE (
[Ventes] * [Qté_Bom],
CROSSFILTER ( Produits[Produit], 'Z_BOM_Explosé'[Produit], BOTH )
)
)
Proud to be a Super User!
Hello, yes I already did but it wasn't working. Thank you
@Anonymous,
Why are you using the CROSSFILTER function? Not sure why you would need to pass filter context from Z_BOM to Ventes, since they share the dimension table Produits.
Proud to be a Super User!
Hello, I tried to simply the example to make it easy to understand, but I'm going to have other columns my result table (# Commande and Ventes from Ventes, Date from Dates, MP and Qté from Z_BOM_Explosé). So the blank rows multiply and I have a rather large dataset so I get millions of useless rows.
Thank you
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |