Forum Discussion
Running total with multi criteria
- Anonymous2 years ago
Hi Ecobat ,
Hope you have a nice day.
Please try:
CALCULATE( SUM('GDM COST_SUMMARY_FACT_VR'[ACTUAL_VALUE_CO_CURR]), FILTER( ALLSELECTED('GDM COST_SUMMARY_FACT_VR'), 'GDM COST_SUMMARY_FACT_VR'[COST_CNTR_ID] == MAX('GDM COST_SUMMARY_FACT_VR'[COST_CNTR_ID]) && 'GDM COST_SUMMARY_FACT_VR'[COST_ELEM_ID] == MAX('GDM COST_SUMMARY_FACT_VR'[COST_ELEM_ID]) && 'GDM COST_SUMMARY_FACT_VR'[Mateix_Date]<= MAX('GDM COST_SUMMARY_FACT_VR'[Mateix_Date]) && YEAR('GDM COST_SUMMARY_FACT_VR'[Mateix_Date]) == YEAR(MAX('GDM COST_SUMMARY_FACT_VR'[Mateix_Date])) ) )Please check the table and field names for spelling errors.
The DAX formula should be corrected to do what you want.
If your problem cannot be solved successfully, please provide error details or a data sample set with personal privacy information and sensitive information removed. Please feel free to contact me at any time.
Warm Regards,
Yang
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!
Hi Ecobat ,
Hope you have a nice day.
Please try:
CALCULATE(
SUM('GDM COST_SUMMARY_FACT_VR'[ACTUAL_VALUE_CO_CURR]),
FILTER(
ALLSELECTED('GDM COST_SUMMARY_FACT_VR'),
'GDM COST_SUMMARY_FACT_VR'[COST_CNTR_ID] == MAX('GDM COST_SUMMARY_FACT_VR'[COST_CNTR_ID])
&& 'GDM COST_SUMMARY_FACT_VR'[COST_ELEM_ID] == MAX('GDM COST_SUMMARY_FACT_VR'[COST_ELEM_ID])
&& 'GDM COST_SUMMARY_FACT_VR'[Mateix_Date]<= MAX('GDM COST_SUMMARY_FACT_VR'[Mateix_Date])
&& YEAR('GDM COST_SUMMARY_FACT_VR'[Mateix_Date]) == YEAR(MAX('GDM COST_SUMMARY_FACT_VR'[Mateix_Date]))
)
)
Please check the table and field names for spelling errors.
The DAX formula should be corrected to do what you want.
If your problem cannot be solved successfully, please provide error details or a data sample set with personal privacy information and sensitive information removed. Please feel free to contact me at any time.
Warm Regards,
Yang
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!