Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Dlookup needed

Status
Not open for further replies.

Bokazoit

Technical User
Sep 16, 2004
73
DK
I have this function:

=DLookUp("[LYFY]";"DVH_krydstabel";"[Market] = DAGLIGVAREHANDLEN EX. COOP")

But it gives me an error (#error) in my report

DVH_krydstabel has these coloumns:

Market, SegmentID, DMLY, DMTY, LYFY, YTDLY, YTDTY

The Dlookup function should give me the value of [LYFY] in the tabel 'DVH_krydstabel' where [Market] = 'DAGLIGVAREHANDLEN EX. COOP' and SegmentID equal the current Segment shown in the report.

Tx ;-)
 
This is weird, now the formula works!?

=DLookUp("[YTDLY]";"DVH_krydstabel";"[Market] = ""DAGLIGVAREHANDLEN EX. COOP"" AND [SegmentID] =""" & Reports!report2!Segment & """")

I have no idea why?
 

Bokazoit,

Im glad, it worked for me and Id run out of explanations why it wasnt working for you :).

Mordja

 
I have just made an iif function, so that when DVH is shown it doesn't lookup anything :)

Well I don't know if I can explain myself good enough, but I have DVH which consist of most of the revenue sold though retailstores in DK.

I also have data from 6 of the greatest retail-chains in DK. I use the data to see how much each of the 5 chains gross-sales is. I then compare that to DVH. So if Retail-chain1 has a 50 million revenue in segment1, and DVH revenue in segment1 is 115m. Retail-chain1's marketshare is 50/115 = 43% in segment1. That's why I need to recall DVH for each segment, for each retail-chain.

I'm not a shark at Access, so prolly there is a better way to do this, but I don't see it though :p

Hope You see my point now, and if You do and have a better idea. Then don't hold back ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top