Forum Discussion
DAX Calculate without dependency to selected filter
- 4 years ago
Hi setiawanan9 ,
Please try the following formula:
Measure = CALCULATE ( SUM ( INV1[Sales] ), FILTER ( ALL ( INV1 ), FORMAT ( INV1[Date], "mmmm" ) = MAX ( 'Calendar'[Month] ) ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
setiawanan9 Can you share what are these measures? How does your data model look like? It is not straightforward to answer without knowing your data model and the relationship between tables. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- setiawanan94 years agoFrequent Visitor
parry2kThanks for your suggestion, so the measure is INV1.Linetotal, table A shows measures INV1.Linetotal (sales value) and OCRD.CardCode (customer name).
Table B will interact with table A. When table A is selected, table B should show INV1.Linetotal, Calendar.Month and another new measure known as “All Sales” that show monthly total sales from all customer. The problem is how to formulate the DAX for “All Sales”.
Thank you !
- v-kkf-msft4 years ago
Community Support
Hi setiawanan9 ,
Please try the following formula:
Measure = CALCULATE ( SUM ( INV1[Sales] ), FILTER ( ALL ( INV1 ), FORMAT ( INV1[Date], "mmmm" ) = MAX ( 'Calendar'[Month] ) ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- setiawanan94 years agoFrequent Visitor
v-kkf-msft thanks for your answer, it is closed to what I have been trying to get the result. Turns out simply use :
Measure = CALCULATE(sum(INV1[LineTotal]),ALLSELECTED(INV1))Once again thank you!