The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I am trying to run the following expression in POWER BI but I get this error: [BC30201] Expression expected
Here is the expression:
=iif ( Fields!DriftCorrection_pH4Value.Value== Blank(),
(Fields!DriftCorrection_pH7Value.Value +Fields!DriftCorrection_pH10Value.Value)/2.0,
(Fields!DriftCorrection_pH7Value.Value +Fields!DriftCorrection_pH4Value.Value)/2.0)
I appreciate your help in advance,
Solved! Go to Solution.
Hi @samratpbi ,Thanks for the quick reply.
Hi @Anonymous ,
Regarding your question, there may be a problem in checking whether the field value is null or not. You can try to use 'IsNothing' instead of '== BLANK()' for null value determination. Change your expression:
IIF(IsNothing(Fields!DriftCorrection_pH4Value.Value),
(Fields!DriftCorrection_pH7Value.Value + Fields!DriftCorrection_pH10Value.Value) / 2.0,
(Fields!DriftCorrection_pH7Value.Value + Fields!DriftCorrection_pH4Value.Value) / 2.0)
Hi @samratpbi ,Thanks for the quick reply.
Hi @Anonymous ,
Regarding your question, there may be a problem in checking whether the field value is null or not. You can try to use 'IsNothing' instead of '== BLANK()' for null value determination. Change your expression:
IIF(IsNothing(Fields!DriftCorrection_pH4Value.Value),
(Fields!DriftCorrection_pH7Value.Value + Fields!DriftCorrection_pH10Value.Value) / 2.0,
(Fields!DriftCorrection_pH7Value.Value + Fields!DriftCorrection_pH4Value.Value) / 2.0)
Thanks!! this worked!
Hi, Thanks, I did it. unfortunately, it is still the same.
Hi, not sure about all the exact table and column name you have, however what I can see your measure starts with iif. As per my understanding, there is nothing iif, can you please change it to IF.
If this resolves your problem, then please make it as solution, Thanks
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |