The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
Having some difficulty creating a new column using an IF/AND statement
New column should only show values that are Phase 3 AND have been billed
Simple data example
PRC_NAME | BILLING PROVIDER NAME | Desired Results Column |
Phase 1 | Smith, Michael | 0 |
Phase 2 | Johnson, Christopher | 0 |
Phase 3 | Williams, Jessica | Billed P3 |
Phase 3 | Brown, Matthew | Billed P3 |
Phase 3 | 0 | |
Phase 3 | 0 | |
Phase 3 | Miller, Joshua | Billed P3 |
Phase 3 | Davis, Amanda | Billed P3 |
Phase 2 | Rodriguez, Daniel | 0 |
Phase 1 | Martinez, David | 0 |
Phase 1 | Allen, Melissa | 0 |
Here is what i've tried
Phase3Billed = IF ('All HOD Visits'[PRC_NAME] = "Phase 3" && 'All HOD Visits'[BILLING PROVIDER NAME] <> BLANK(), "Billed P3", 0)
This returns an error "Expressions that yield variant data-type cannot be used to define calculated columns
Thanks for any assistance!
Solved! Go to Solution.
Sorry You just add "0" to your zero at the end. That way it is all string data.
Sorry You just add "0" to your zero at the end. That way it is all string data.
Hello:
You can try
IF(AND('All HOD Visits'[PRC_NAME]= "Phase 3", NOT(ISBLANK('All HOD Visits'[BILLING PROVIDER NAME]), "Billed P3", 0))
I hope this works for your application.
That returns "Operator or expression '()' is not supported in this context
User | Count |
---|---|
15 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |