Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I want row count of ST_setups[PO_No_Key] table those also exists in inv_challan_gatepass.. table where for those PO_No_Key inv_challan_gatepass[shipment_date] is equal or earlier than ST_setups[delivery_date]. Date (ST_setups[delivery_date]) is selected from date slicer using DAX.
I just want to count PO_No_Key shipped on or before delivery date. Date is selected from slicer.
Thanks in advance.
Solved! Go to Solution.
Try
Shipped on or before delivery =
COUNTROWS (
FILTER (
'inv_challan_gatepass',
'inv_challan_gatepass'[shipment_date]
<= RELATED ( ST_Setups[delivery_date] )
)
)
Try
Shipped on or before delivery =
COUNTROWS (
FILTER (
'inv_challan_gatepass',
'inv_challan_gatepass'[shipment_date]
<= RELATED ( ST_Setups[delivery_date] )
)
)
Thanks Johnt75, it taises syntax error. Here is more sample data . Count is three here.
What is the error it is raising ?
Why you write PO_No_Key column infront of the table name!!
That's my copy & paste error. I've edited my original post to correct the mistake.
Here how are we checking PO_No_Key of ST_Setups table exist in inv_challan_gatepass table?
The slicer on the delivery date will filter ST_Setups and that filter will be passed to inv_challan_gatepass by the relationship
I am not getting the right output. Is this relationship correct?
Yes, that looks correct. Can you paste some sample data in a format that can be copied & pasted ?
This PO_No_Key 20409 is shpped before delivery date. but my report is not returnng.
That works for me using the data you shared. Do you have any other filters being applied ?
Grab the query generated for the visual in Performance Analyzer and have a look at it in DAX Studio. That might give you some pointers.
Does it return count 1(one) if you select 30th august on your date slicer ? as 20409 its delivery date is 30th 2022 august and ship_date is 26th august 2022
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.