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, im new in power bi and query and I would like to use the "Alternate" to evaluate a second condition of the function:
LOOKUPVALUE( Table2[age], Table2[ID], Table1[ID], (LOOKUPVALUE (Table2[age], Table2[Class], Table1[Class], -1))
In the first evaluation of the LOOKUPVALUE, if the ID is present in the Table2, then age will be returned. Fine (works)
else, if the ID is not present, i would like to search for class column (this is my use case).
but the formula return BLANK() and not the second function, at least i would like to see "-1" in the wrost case (if no id or class are present in the table2)
Whats wrong? Thanks.
The code works fine with some sample data so I suspect the problem is in your data. You could try creating 2 calculated columns, one using each version of the LOOKUPVALUE, then investigate further into rows where you are getting blank or -1.
User | Count |
---|---|
24 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
29 | |
13 | |
11 | |
10 | |
9 |