Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Helo Community,
I am trying to write down formula using DAX COALESCE function and I am getting below error.
“Expressions that yield variant data-type cannot be used to define calculated columns.”
How do I write below formula?
Coalsec =
var Good='A&I'[% Price Up or Down]>0.010000 && 'A&I'[Active / Inactive] = "Active"
var Poor='A&I'[% Price Up or Down]>=0.000000 && 'A&I'[% Price Up or Down]<=0.009999 && 'A&I'[Active / Inactive] = "Active"
var result=
COALESCE(Good,Poor,"No Impact")
return
result
Thanks
The SQL Coalesce and IsNull functions are used to handle NULL values. During the expression evaluation process the NULL values are replaced with the user-defined value.
The SQL Coalesce function evaluates the arguments in order and always returns first non-null value from the defined argument list.
Syntax
COALESCE ( expression [ 1…n ] )
Thank you so much Amit. I am using March vesion and I am getting below error.
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |