Forum Discussion
DAX Calculate without dependency to selected filter
Hi everyone,
I'm trying to figure out how to solve case like this :
A. Table to show total sales each customer
B. Table to show total sales each month based on customer selected from table A and show total sales each month without dependency to customer selected from table A. so these two measures will show comparison of sales each customer selected monthly vs total all sales monthly side by side in table B
Any help is appreciated .. Thanks !
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.
4 Replies
- parry2k
Super User
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- setiawanan9Frequent 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-msft
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.