Keep getting error when trying to use =related function in PowerPivot

Greetings,
I have created a relationship between two tables based on a common field in PowerPivot, and whenever I use the =related() function to try and bring data from a field in one table to a field in another table, I keep getting and error message that says:
The column 'XXXX[xxxx]' either doesn't exist or doesn't have a relationship to any table available in the current context.
Any ideas? I've made this work before in a different dataset so I'm not sure what I'm missing. I have a feeling it might be really basic, but I'm spinning my wheels here.
Thanks very much!
MFW

Hi MFW,
This sounds like the table where you are trying to use the RELATED function from is on the
one side of the one-to-many relationship (i.e. the relationship arrow is pointed towards it). If in reality there is only a
one-to-one relationship between the data and you only need to bring the data from one table to the over, you can simply reverse the direction of the relationship and the RELATED function will work as expected. If this is not the case then you'll
need to use RELATEDTABLE instead of RELATED and some kind of aggregation or computation that ensures that a single value is returned  for the column you are trying to get data from. There is also another function called CALCULATE which can be used for
this scenario.
Imagine that we have two simple tables: Table1 and Table2...
Table1
Column1
Column2
1
A
2
B
Table2
Column1
Column2
1
AA
2
BB
...and create a relationship where Table1 is on the many side and Table2 is on the one side i.e. Table1 -> Table2
We could use a number of methods to pull the the values from Column2 in Table1 into a new Calculated Column in Table2.
If the column we are trying to pull contains text values then we could use a combination of the CALCULATE and LASTNONBLANK function:
=CALCULATE(LASTNONBLANK(Table1[Column2], TRUE()))
If the Table1[Column2] contained only numeric or date values then we could use a combination of the RELATEDTABLE and MAXX functions:
=
MAXX(
RELATEDTABLE(Table1),
Table1[Column2]
An alternative to the DAX directly above is to use the CALCULATE and MAX functions:
CALCULATE(MAX(Table1[Column2]))
You can learn more about the functions I have referred to below:
CALCULATE
LASTNONBLANK
RELATEDTABLE
MAXX
Regards,
Michael Amadi
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
Website: http://www.nimblelearn.com, Twitter:
@nimblelearn

Similar Messages

  • Keep getting error when trying to instal Mavericks at the stage when computer is supposed to restart?

    Have tried to instal mavericks on a 2011 mac mini serveral times and keep getting a error when it gets to the reboot stage. Help needed thanks!

    Have you tried un-installing, then going to Apple Downloads (http://support.apple.com/downloads/) for download /installation of QT 7.6.2?
    Also - it wouldn't hurt to repair permissions before & after installation.

  • HT4623 I keep getting error when trying to update to version 7.1

    I'm trying to update but it keeps getting an error

    Me too- been trying for >1hr and If get a "software Update Failed" and "an error occurred downloading IOS 7.1."
    I'm still on version 6.1.4. Can't believe the servers are still that swamped...

  • HT1212 I keep getting error when trying to restore my ipod

    When I try to restore my 'disabled ipod' I keep getting an error message - 3094 (I think) what am i doing wrong?

    Was it really error 3194
    See:
    iOS: Restore error 3194 or 'This device isn't eligible for the requested build'
    How to solve iTunes error 3194 in 10 simple steps

  • Keep receiving error when trying to use a new Apple ID

    "Please sign in again. For added security, we need to reconfirm your Apple ID."
    I am beyond frustrated and have been working on this for about 2 hours. I don't understand how something so simple is becoming such a nusance. I created a new Apple ID however when trying to log into support, it gives me the phrase listed above. No matter how many times I try to log in, it completely shuts me out. If I use my old ID to log into the Apple ID site and then navigate to support, it logins me in no question.
    I have looked at others who have had this issue and it appears to be an email conflict on multiple accounts. However both account use completely different email addresses. Any help is appreciated.
    If I could just delete the conflicting account that would alleviate a lot of stress.

    Is Apple abandoning the forums?
    Unofrtunately, I don't have an answer to your problem - just wanted to let you know that these forums are user to user only; there are no Apple employees here.

  • Error when trying to use trim function

    when i try to use trim function on a column it gives me following error for the below query
    select trim(first_name) name from table1@pa1;
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    DSNT408I SQLCODE = -440, ERROR: NO FUNCTION BY THE NAME TRIM HAVING COMPATIBLE ARGUMENTS WAS FOUND IN THE CURRENT PATH DSNT418I SQLSTATE = 42884 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNXORFN SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = -100 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'FFFFFF
    any idea gurus ???Thanks

    This might work:
    select trim(first_name) name from
      (select first_name from table1@pa1);The problem is that pa1 is a non-Oracle database and does not have a trim function. It may have another function that does the same thing but it's not called TRIM.

  • Keep getting errors when trying to open JAR files

    Hi
    My son is trying to open a .jar on his Macbook to add a mod to Minecraft.  It throws an error and directs him to Console each time, but Console isn't showing any errors.  Using advice on a couple of similar threads I followed some steps but ended up at a dead end.
    The Terminal message I get when I follow the steps in another thread is this:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
    Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Any help on what I need to do to resolve this so he can open it will be much appreciated.
    Thanks
    Andy

    Hi Eric.
    I am referring to the main  Console.  I don't see anything in Java Console - but the steps I followd in teh other thread yielded that error message from Terminal - it was different from the error in the other thread, which related to out of data Java install.  I have no clue what this is and Google isn't helping me much.
    Any light that can be thrown on on this woudl be great
    Thanks

  • I keep getting errors when trying to download Acrobat Pro.

    Can someone help?

    What is the error message that you receive?
    Have you tried using a different web browser?

  • Ipod nano 6 keep getting error when trying to sync ipod with itunes. Cannot copy cos cannot be found. Latest versions installed

    I have had the ipod for some time and am not having a problem with the iphone or ipad. I have reinstalled the itunes and real time but am still getting the following message: Some of the tunes in the itunes library were not copied to the ipod because they cannot be found. 100+ problems - keeps selecting different tunes.

    Hi Jullo59,
    If you are having issues with iTunes being unable to locate files, you may need to rebuild the iTunes library. The following article may be helpful:
    iTunes: How to re-create your iTunes library and playlists
    http://support.apple.com/kb/HT1451
    Cheers,
    - Brenden

  • Getting error when trying to use on 64bit server.

    I have deployed my .NET app to 32bit workstations with no problem, but I have some users that remote in to the server to run and they cannot print reports.  They are getting the following error
    Either Crystal reports registration key permissions are insufficient or the Crystal Reports runtime is not installed.
    Please install appropriate Crystal Reports redistributable
    What do I need to do in order for this to work in 32bit and 64bit environments?

    Need more info.
    1) What version of CR?
    2) What OS?
    3) Is this a we app or some sort of server / client app?
    4) What version of .NET?
    Also, from your description, I'm having a problem connecting that to your query re 32 bit and 64 environments(?).
    Ludek

  • Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    I may have already resolved this issue buy removing the device from my computer and re-pairing it. It is currently working just fine.

  • I keep getting this when trying to open Time machine:   An unexpected error occurred (error code -6584).

    I keep getting this when trying to open Time machine:   An unexpected error occurred (error code -6584). time machine wont even open up. My Time capsule has a green lite and appears fine
    Thaks,

    This often means the backup is corrupted.
    First of all reboot the network.. turn everything off and restart in order.. modem.. TC.. clients.
    If you still have issues, hold the option key when you click the Time Machine icon on the top menu and it will bring up verify backups.
    Do that.
    Read this thread if you need more..
    https://discussions.apple.com/thread/3123920?tstart=0
    It seems to be a fairly complex problem if the above don't work.

  • Currently using Flash Pro CS5,  getting error when trying to open CS4 file.  Error is "Slides and Forms documents are not supported in this version of Flash. Please open in previous version.

    Currently using Flash Pro CS5,  getting error when trying to open CS4 file.  Error is "Slides and Forms documents are not supported in this version of Flash. Please open in previous version.  Has there been a fix or patch to this issue or do I have to convert back to CS4 to open the file?

    Having the same problem in CS6.  I can tell you that converting back to CS4 will NOT solve the problem.  It seems when support for backward compatibility is discontinued, there's just no way to get
    any help at all?  Absolute failure to provide any user support so far...

  • I get the following error when trying to use the itunes store "your apple id has been disabled"

    I get the following error when trying to use the itunes store "your apple id has been disabled".  My account was disabled when someone else had been using it without my knowledge.  I changed my apple id password and the apple id is still fine, but itunes has it disabled.  I verified that the computer is authorized for this apple id.  What to do now?

    Welcome to the Apple Community.
    Contact Apple through iTunes Store Support

  • I keep getting error when i try to log in to Adobe to post results.  I have created an ID.

    I keep getting error when i try to log in to Adobe to post results. I have created an ID.

    Running the Lion Os requires a MINIMUM of 2 GB of RAM, as you have.  However, with that little RAM the computer will have trouble with many memory based tasks, such as copying and pasting.  You really need to increase the amount of RAM your computer has in order to increase its speed and performance.  Now, when a task requires more RAM than your system has available then the OS will use some harddrive space temporarily instead.  This is called "Virtual Memory."  Is it possible that at this time that your harddrive is very full relative to its stated capacity, so that even "virtual memory" is not really available?  If that is the case, you really need to cleanup your harddrive by deleting a fair number of less used files.
    Hope this helps

Maybe you are looking for

  • Weird Picture- Color is horrible

    Hi- compressed this picture in Compressor using the H.264 (800kbs) preset. The source was DV that was rendered from mostly HDV content. One the iMac I compressed it on (running Leopard) it looks great, but when I view it on a G5 running 10.4.9 it loo

  • Can a pdf be saved as static/flat version?

    Hi there Anyone know of a clever way to save a dynamic LiveCycle pdfForm (with calculation etc) as a flat pdf?? I would like that calculations (time, date lookup etc.) will not run when pdf is re-opened. (I know that this can be scripted, but the ide

  • Temp tables and dml commit

    I need to create a temporary table that is transaction oriented (not session), insert data into it, and read the data. Apparently, each xsql:dml implies a commit. I cannot use "Preserve rows" (session related) in my table definition, and each commit

  • How to run OS command through Apex

    Hi, I am using Apex 4.1 on Linux5 with database 11gR2. I have created one page in apex which contains all my host names for different environments. Is it possible to put some function in apex so that I may open a putty/ssh session by clicking/right-c

  • Can you change app icons?

    Hi. I want to know if you can change the picture/icon of an app. Everyone at my school needs to have an iPad but we are not allowed to have games on there. I want to play games at home but it would be a ginourmous pain if i had to download  the apps