• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Variable to sum balloon values do not work

jutu

Member
Hi. I am trying to calculate the sum of TRUE balloon values in Sales.Open using a variable.
The below doesn't work if you can help please. I've tried different ways of calculating it (with and without variable) but to no vail.
A member asked me why I was putting the ALL function at all. The reason I put the ALL function is because otherwise it doesn't bring the tables columns.
Because of this I find myself including the ALL function in DAX measures for no apparent reason, sorry.
Calculate supposes to filter and may be that's why it's not working?

Count of open orders.TRUE =
VAR TrueValue = IF(ALL('Sales'[Open]) = TRUE(), 1, 0) ---- I think another parenthesis should go here but it doeesnt give me error
RETURN
CALCULATE(SUM(TrueValue), FILTER(ALL('Sales'), 'Sales'[Open] = 1))


Also tried the below DAX;
Count of open orders TRUE =
COUNTA(FILTER(ALL('Sales', 'Sales'[Open])=TRUE())
 
Last edited:
I found a solution to it as below by just adding CALCULATE function:
Count of open orders.TRUE =
CALCULATE(COUNTA('Sales'[Open]), FILTER('Sales','Sales'[open]=TRUE()))
 
Back
Top