Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Getting values from another table (Table 1) when Table 1 ID is between the value in Table 2

Getting values from another table (Table 1) when Table 1 ID is between the value in Table 2: Column 1 (From ID) AND Column 2 (To ID).   Lets say that Table one has two rows with there own unique ID...
  • Anonymous's avatar
    Anonymous
    3 years ago

    So thanks again,

    Table1 and Table2 are me just replicating your embedded values using the two DAX scripts you provided.  Good and thank you.

    The other four tables are the data of the event values used for table one from the data tables: Events and Event Register.  the second set are just another set.  The Register Table always has one row as it really is the range of entry ID 's used in the posting of the initial Event Entries using the From ID AND the To ID.  and so the merge of the two (or JOIN) is showing when providing the list you have all the lines from the original posting and so a audit as it were.  Just having difficulty crafting the JOIN in SQL and so was attempting to do in Power BI. I just need to translate you query (ies) and make it work with mine other than must for the two embedded Event ID's you included in your scripts.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Three days ago, I finally worked through this and did the question dataset in SQL as a SQL View as there are 70 event data organization databases with Event Log Entries and Event Registry Tables and it was a INNER JOIN using the Envents to the Registry Entries as the JOIN (ON) AND the Event Entry ID (Event Log)  BETWEEN the From Entry No (Registry Log) AND the To Entry No (also in Registry Log).  This then allowed me to join (add the columns from the Registry Log table to the Event Entry Table values.  because I had already with the Event Log Entries across all Event Organization in to on SQL View; I then Joined this as my main FROM source for the above INNER JOIN.    Not yet sure how to do this INNER JOIN in Power BI..  The Main JOIN between the Event Log Entries was the created nvarchar(40) for the Parent ID (with is the Event Company ID Code); and then the Event Entry ID AND the BETWEEN statement.