Forum Discussion
[DAX Measure] Correct values, but wrong total
Hi amitchandak,
Thank you very much!
Unfortunately, your DAX formula returns
"The syntax for '&&' is incorrect. (DAX(CALCULATE (DISTINCTCOUNT ( 'Sales'[Deal ID] ),FILTER ('Sales' ,coalesce(CALCULATE(Max('Sales'[Deal Closed]) , ALLEXCEPT ( 'Sales', 'Sales'[Deal ID] )), false()) =True(),&& 'Sales'[Deal Won] = FALSE ()))))."
Deleting the ',' after "TRUE ()",
COUNT_Reseller_Lost_NEW =
CALCULATE (
DISTINCTCOUNT ( 'Sales'[Deal ID] ),
FILTER ('Sales' ,
COALESCE (
CALCULATE(
Max('Sales'[Deal Closed]) ,
ALLEXCEPT ( 'Sales', 'Sales'[Deal ID] )
),
FALSE ()
)
=TRUE ()
&& 'Sales'[Deal Won] = FALSE ()
)
)
lets the formula pass as measure, but as soon as I want to use it in a vizual, I get the error message
Any alternative to 'MAX' when it cannot work with BOOLEAN?
Thanks a lot!
Mister_T , Try like
COUNT_Reseller_Lost_NEW = CALCULATE ( DISTINCTCOUNT ( 'Sales'[Deal ID] ), FILTER ('Sales' , COALESCE ( CALCULATE( Count('Sales'[Deal Closed]), 'Sales'[Deal Closed] = TRue() , ALLEXCEPT ( 'Sales', 'Sales'[Deal ID] ) ), 0 ) <>0 && 'Sales'[Deal Won] = FALSE () ) )
- Mister_T5 years agoAdvocate I
Thank you, amitchandak! Your help is greatly appreciated.
Unfortunatelly, here again, I get an error message, when using this measure as value for a table (or any other) visual:
"The function COUNT cannot work with values of type Boolean."Best regards,
Mister_T