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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Thiagops
Helper II
Helper II

Column with information from another table

Good morning,

I need to create a column in the CUSTOMERS (WALLET) table.
This column will pull information from the PEDIDO_VENDA table (Date of the last quote made by the customer).
I can't relate the two tables because it generates ambiguity with another table (SELLERS).
Follow the formula below and screen prints:

 

Data da última cotação =
CALCULATE(
MAXX ( RELATEDTABLE ( PEDIDO_VENDA ), PEDIDO_VENDA[PV_DATA_PEDIDO] ),
PEDIDO_VENDA[PV_TIPO] = "COTAÇAO",
PEDIDO_VENDA[CFOP_CODIGO] = "5102" ||
PEDIDO_VENDA[CFOP_CODIGO] = "6102"
)

 

Thiagops_0-1677840506215.png


In the case below, it should pull the most recent date (09/09/2022), but the result comes out 03/02/2023

Thiagops_1-1677840721053.png

 

1 REPLY 1
Adamboer
Responsive Resident
Responsive Resident

Based on the provided information, it seems like there may be an issue with the formula used to pull the information from the PEDIDO_VENDA table. Here are some steps you can try to troubleshoot the issue and get the correct date:

  1. Double-check that the formula is entered correctly with no typos or missing information.
  2. Verify that the PEDIDO_VENDA table contains the correct date for the last quote made by the customer. If the date in the table is incorrect, it will not pull the correct date in the CUSTOMERS (WALLET) table.
  3. Check if there are any filters applied to the data that may be affecting the results. Make sure that there are no filters on the PEDIDO_VENDA table that are causing it to exclude the most recent date.
  4. If the issue persists, consider seeking assistance from a database administrator or specialist who can provide further troubleshooting and support.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Users online (2,926)