Forum Discussion
SuzieKidd
2 years agoFrequent Visitor
DAX formula
Hello, I wonder if someone could help me. I have a table with people details and associated costs, these costs can span many years and I need to get the total cost in each fiancial year which is Apri...
Anonymous
2 years agoNot applicable
Hi SuzieKidd ,
Please try this:
Total Costs All =
VAR __maxDate = MAX(Calendar_Lookup[Date])
VAR __minDate = MIN(Calendar_Lookup[Date])
RETURN
CALCULATE(SUM(CPLIFactor[Total Cost]), FILTER( ALLSELECTED(CPLIFactor),CPLIFactor[Start Date] <= __maxDate && (__minDate < CPLIFactor[End Date] || ISBLANK(CPLIFactor[End Date]))))
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.