Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have created a measure (Total Sales) in sales table of the model. This measures is displayig on the visual with 'Customers'[customer name] . Both the tables 'Customers' and 'Sales' have one-many relationship and the model has many other tables like 'Date', 'Products'.
The measure's values should be sliced by 'Customers' table only not by any other table. I am using this dax currently and working correctly:
Total Sales = Calculate(SUM('Sales'[sales amount]), ALL('Date'), ALL('Products'),.........)
As the model has many tables 20+ and adding these many tables in ALL doesn't look perfect.
Is there any other way in dax to acheive the same?
Thanks
Solved! Go to Solution.
Try this measure. It uses ALL with no arguments to clear all filters, and then restores the filters on Products.
Total Sales =
CALCULATE ( SUM ( 'Sales'[sales amount] ), ALL (), VALUES ( 'Products' ) )
Proud to be a Super User!
Try this measure. It uses ALL with no arguments to clear all filters, and then restores the filters on Products.
Total Sales =
CALCULATE ( SUM ( 'Sales'[sales amount] ), ALL (), VALUES ( 'Products' ) )
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |