Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ErickM49315
New Member

Troubles using LOOKUPVALUE

Hi team, im trying to use VLOOKVALUE into Cycle account dashboard to return 1 or 0, it depends of 2 conditions:

- 1 count pivot table's dates has the same dates as inventory

- 1 count pivot table's IDs has the same IDs as inventory

to this column im trying to calculate it as:

Qty_SU = LOOKUPVALUE('Inventario'[Cantidad], SELECTCOLUMNS(Inventario,Inventario[Date]=Tabla_Dinamica_Conteo1[Date]),"LPN",Inventario[ID],Tabla_Dinamica_Conteo1[ID],0)

 

Function SELECTCOLUMNS expects a column name as argument number 2.

It is pretended to select more than 1 day to see the results throw the time. as result obviously i got #ERROR

 

 

an advice to me?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @ErickM49315 ,

 

The error message is because the second parameter of the SELECTCOLUMNS function should be the column name, but you are passing the table as a parameter.

You can try the following dax:

LOOKUPVALUE(
    'Inventario'[Cantidad], 'Inventario'[Date],'Tabla_Dinamica_Conteo1'[Date],'Inventario'[ID],'Tabla_Dinamica_Conteo1'[ID],1)

Refer to:

LOOKUPVALUE function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @ErickM49315 ,

 

The error message is because the second parameter of the SELECTCOLUMNS function should be the column name, but you are passing the table as a parameter.

You can try the following dax:

LOOKUPVALUE(
    'Inventario'[Cantidad], 'Inventario'[Date],'Tabla_Dinamica_Conteo1'[Date],'Inventario'[ID],'Tabla_Dinamica_Conteo1'[ID],1)

Refer to:

LOOKUPVALUE function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.