Forum Discussion
ALL() DAX not working as expected
I have a dax that calculates Seat Utilization as
New Seat Requirement =
var A = SUMMARIZE(Fact_Workmodel,Fact_Workmodel[FCT Load Date-week start date],Fact_Workmodel[Associate ID],"Seat_Requirements",DISTINCT(Fact_Workmodel[Seat Requirement]))
RETURN SUMX(A,[Seat_Requirements])
I need this to be divided by a value that is the sum of this new Seat utilization ignoring any filter on [Practice].
Hence created the Total Seat Utilization as
Total Seat Requirement =
CALCULATE([New Seat Requirement],ALL(Dim_RegionMapping_vw[Practice]))
Upon placing these measures into a table view, I get the below result. Which is fine.
But upon selecting a particular Practice from a slicer, The total Seat requirement is not expected to change, but it changes.
as below. Need support in fixing this.
8 Replies
- nilendraFabric
Super User
Hello PBI_user_mumbai
give this a try
Total Seat Requirement =
CALCULATE(
[New Seat Requirement],
ALL(Dim_RegionMapping_vw)
)Thanks
- PBI_user_mumbaiRegular Visitor
But I want this to not change based on [Practice] column selection only. It should change based on any other column selection from this table(Regionmapping_vw).
- nilendraFabric
Super User
please try this
Total Seat Requirement =
CALCULATE(
[New Seat Requirement],
REMOVEFILTERS(Dim_RegionMapping_vw[Practice])
)
- danextian
Super User
The filter modifier is applied to Dim_RegionMapping_vw[Practice]. Are you using the same column in your table viz?
- PBI_user_mumbaiRegular Visitor
Yes, the filter is applied from same table(Region_mapping_vw)
- divyed
Super User
Hello PBI_user_mumbai ,
Try below dax pls :
New Seat Requirement =
VAR A = SUMMARIZE(
Fact_Workmodel,
Fact_Workmodel[FCT Load Date-week start date],
Fact_Workmodel[Associate ID],
"Seat_Requirements", DISTINCT(Fact_Workmodel[Seat Requirement])
)
RETURN SUMX(A, [Seat_Requirements])Total Seat Requirement =
CALCULATE([New Seat Requirement], REMOVEFILTERS(Dim_RegionMapping_vw[Practice]))I hope this helps.
Regards,
- AnonymousNot applicable
You can try to modify the code as follows:
New Seat Requirement = VAR A = SUMMARIZE( Fact_Workmodel, Fact_Workmodel[FCT Load Date-week start date], Fact_Workmodel[Associate ID], "Seat_Requirements", DISTINCT(Fact_Workmodel[Seat Requirement]) ) RETURN SUMX(A, [Seat_Requirements])Total Seat Requirement = CALCULATE( [New Seat Requirement], REMOVEFILTERS(Dim_RegionMapping_vw[Practice]), VALUES(Dim_RegionMapping_vw) )If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table. This will help resolve your issue.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.