Forum Discussion
Vamshi_PBI
2 years agoFrequent Visitor
Help with DAX ALLSelected
Hi Team, I need some help with writing dax formula. PFB details. My data model is having 2 tables and the data modelling as below . My datasource is a combination of live and direct query. ...
Anonymous
2 years agoNot applicable
Hi Vamshi_PBI
Your problem may be related to using the ALLSELECTED function in DirectQuery mode.
One possible solution is to use the KEEPFILTERS function instead of ALLSELECTED. The KEEPFILTERS function preserves the existing filters in the filter context and applies them to the specified column or table. For example, you can create a new measure like this:
All Amount =
CALCULATE(
SUM(FactSales[Amount]),
KEEPFILTERS(FactSales)
)
If you still have problems, it's best to provide the pbix file with your expected results and be careful to remove sensitive data.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.