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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi! I'm looking for the number of delivery notes with a delivery date (picking_date) greater than the invoice date. The DAX expressión should be similiar to:
Albaranes con fecha posterior a fecha facturación =
CALCULATE(
COUNT(fact_stock_picking[stock_picking_id]),
fact_stock_picking[picking_date_id]
>
fact_sale_invoice[invoice_date_id]
)
However that's wrong. I tried to use "RELATED" and "LOOKUPVALUE" but they doesn't work. I think that it's for the relationships between tables: fact_stock_picking and fact_sale_invoice are related by a bridge table (rel_stock_picking_sale_invoice).
The result that I'm looking for is like this SQL query:
How can I do this in Power BI? Thank you!!
@powerbi2srm , try with help from common dim
Albaranes con fecha posterior a fecha facturación =
CALCULATE(
COUNTX(filter( Summarize(res_stock_picking_Sales_invoice, "_1" , min(fact_stock_picking[picking_date_id]), "_2", Min(fact_sale_invoice[invoice_date_id]))
[_1]> [_2]), [stock_picking_id]) )