Forum Discussion
Dax formula result blank
- Anonymous2 years ago
Hi Aidadiawndao ,
Does the filter context for Plant_ID_Period_Key[Date] contain multiple values? If so, the SELECTEDVALUE ( Plant_ID_Period_Key[Date] ) part returns null, which could be a reason.
Please try:_TotalOrdered_Executed_PID_SelectedPeriod_Test = CALCULATE ( [_Sum Total Ordered Value], FILTER ( ALL ( Plant_ID_Period_Key ), Plant_ID_Period_Key[Date] IN ALLSELECTED ( Plant_ID_Period_Key[Date] ) && [_Calculated_RPEXEC] = "Executed at PID Level" ) )Or
_TotalOrdered_Executed_PID_SelectedPeriod_Test = CALCULATE ( [_Sum Total Ordered Value], FILTER ( ALL ( Plant_ID_Period_Key ), Plant_ID_Period_Key[Date] >= MIN ( Plant_ID_Period_Key[Date] ) && Plant_ID_Period_Key[Date] <= MAX ( Plant_ID_Period_Key[Date] ) && [_Calculated_RPEXEC] = "Executed at PID Level" ) )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi Aidadiawndao ,
Does the filter context for Plant_ID_Period_Key[Date] contain multiple values? If so, the SELECTEDVALUE ( Plant_ID_Period_Key[Date] ) part returns null, which could be a reason.
Please try:
_TotalOrdered_Executed_PID_SelectedPeriod_Test =
CALCULATE (
[_Sum Total Ordered Value],
FILTER (
ALL ( Plant_ID_Period_Key ),
Plant_ID_Period_Key[Date]
IN ALLSELECTED ( Plant_ID_Period_Key[Date] )
&& [_Calculated_RPEXEC] = "Executed at PID Level"
)
)
Or
_TotalOrdered_Executed_PID_SelectedPeriod_Test =
CALCULATE (
[_Sum Total Ordered Value],
FILTER (
ALL ( Plant_ID_Period_Key ),
Plant_ID_Period_Key[Date] >= MIN ( Plant_ID_Period_Key[Date] )
&& Plant_ID_Period_Key[Date] <= MAX ( Plant_ID_Period_Key[Date] )
&& [_Calculated_RPEXEC] = "Executed at PID Level"
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Thank you Gao; the 1st solution works