Forum Discussion
Calculation not correct when using a visual filter
Yes, ALLSELECTED is going to be problematic in that case. Try going with ALL.
Problem is that when using ALL() I get a straight line for the line graph. It basically gives me the sum of all the data in the table as nothing is selected. I would like that I have something link ALLSLICERSBUTNOTVISUALFILTERS() as function if you know what I mean. Would there be a workaround for this scenario?
- Greg_Deckler8 years agoCommunity Champion
Oh yeah, try ALLEXCEPT so that you can keep your slicer settings.
- kvbe8 years agoFrequent Visitor
Hmm. Trying ALLEXCEPT() does not really work with the filter I am useing. Not sure why.
When I change the measure to this:
RunningTotalOrders = IF(LASTDATE(zz_Dim_Date[Calendar_Date]) > TODAY(), BLANK(),CALCULATE(sum(OrdersRaised[OrderTotal]),ALLEXCEPT(zz_Dim_Date,zz_Dim_Date[Calendar_Year],zz_Dim_Date[Month_Name])))
Then it gives me the correct "value" but it does not work as a running total anymore as I cannot use the extra filter parameter anymore.
zz_Dim_Date[Calendar_Date] <= MAX(zz_Dim_Date[Calendar_Date])
So if use the first ALLEXCEPT() then I get this as result:
the black line should also be stepwise in stead of straight?
Not sure if I fully understand it though.