Forum Discussion
Dax Help For Self Join
- 6 years ago
The Variables set the value to be used in the filter part of the calculate in the context of the row being evalulated
So essentially what the calc column is doing is saying count the number of rows in the entire table where the location = location in the current row and the status = the status in the current row and the tender date = the ship date in the current row.
Make Sense?
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Hi Anonymous ,
The second row doesn't meet the condition that Ship Date is equal to Tender Date. It will not be counted though their location is the same one.
If that formula can't work in your actual report, you could try this one. I add a condition of location.
Measure =
COUNTROWS (
FILTER (
'Inv_Fact_Inventory',
'Inv_Fact_Inventory'[Ship Date] = 'Inv_Fact_Inventory'[Tender Date]
&& 'Inv_Fact_Inventory'[Status Code] IN { "SHIP", "TENDER" }
&& Inv_Fact_Inventory[Location] = MAX(Inv_Fact_Inventory[Location])
)
)
By applying this filter , its not returning any result
Inv_Fact_Inventory[Location] = MAX(Inv_Fact_Inventory[Location])