Forum Discussion

Peter_au's avatar
Peter_au
Helper I
6 years ago

Access Query to Power BI Table Challenge

Hello,

 

I have a query and a table in Access. I have used a query to produce a simple resultant table.

 

I have connected the query and table with their relationships to Power BI and I am trying to produce the same result in Power BI. 

I can produce the required result in Access, but not in Power BI.

 

I have a Date table with the required relationship to the tables in Power BI. I have also tried a Disconnected Date Table, but it is not an ideal solution as there are other graphs on the same page which rely on the filters.

I have tried multiple different approaches and have trolled through previous posts, but have gotten nowhere with this one.

 

Below is the expected result

 

Batch_ColourSumOfTonnes_Blast_id
RomPad3_Finger_Gris1152
RomPad3_Finger_Jaune2592
RomPad3_Finger_Orange960

 

 

 The tables and relationships

 
 

Table 1

Date_TirageDate_TransfertBatch_nbTonnes_Blast_id
2020-07-012020-07-01RomPad3_Finger_Orange_B00059336
2020-07-012020-07-01RomPad3_Finger_Orange_B00059288
2020-07-012020-07-02RomPad3_Finger_Violet_B00057288
2020-07-032020-07-03RomPad3_Finger_Gris_B00060288
2020-07-032020-07-03RomPad3_Finger_Jaune_B00062144
2020-07-032020-07-04RomPad3_Finger_Gris_B00060336
2020-07-042020-07-04RomPad3_Finger_Gris_B00060288
2020-07-042020-07-05RomPad3_Finger_Jaune_B00062768
2020-07-052020-07-05RomPad3_Finger_Gris_B00060240
2020-07-052020-07-05RomPad3_Finger_Jaune_B00062336
2020-07-052020-07-05RomPad3_Finger_BT_B00055240
2020-07-052020-07-06RomPad3_Finger_Jaune_B00062720
2020-07-052020-07-06RomPad3_Finger_Jaune_B00062624
2020-07-062020-07-07RomPad3_Finger_Orange_B00063288
2020-07-062020-07-07RomPad3_Finger_BT_B0005548
2020-07-062020-07-07RomPad3_Finger_Orange_B0006348
2020-07-062020-07-07RomPad3_Finger_BT_B00055336
2020-07-062020-07-07RomPad3_Finger_Orange_B00063192
2020-07-062020-07-07RomPad3_Finger_Violet_B00064768
2020-07-072020-07-07RomPad3_Finger_Orange_B00063384
2020-07-072020-07-08RomPad3_Finger_Orange_B00063480
2020-07-072020-07-08RomPad3_Finger_Orange_B00063288
2020-07-082020-07-09RomPad3_Finger_Orange_B00063240
2020-07-082020-07-09RomPad3_Finger_Violet_B00064288
2020-07-082020-07-09RomPad3_Finger_Violet_B000641104
2020-07-092020-07-09RomPad3_Finger_Orange_B00063192
2020-07-092020-07-09RomPad3_Finger_Orange_B00063144
2020-07-092020-07-09RomPad3_Finger_Orange_B00063192
2020-07-092020-07-09RomPad3_Finger_Orange_B00063144
2020-07-092020-07-09RomPad3_Finger_Orange_B00063288
2020-07-092020-07-09RomPad3_Finger_Orange_B0006348
2020-07-092020-07-09RomPad3_Finger_Orange_B0006348
2020-07-09  336
2020-07-09  288
2020-07-09  144
2020-07-09  288
    

 

 

Table two

 

Batch_nbOpen_DateClose_DateBatch_Colour
RomPad3_Finger_Gris_B000522020-06-232020-06-25RomPad3_Finger_Gris
RomPad3_Finger_Orange_B000532020-06-262020-06-29RomPad3_Finger_Orange
RomPad3_Finger_Jaune_B000542020-06-262020-06-29RomPad3_Finger_Jaune
RomPad3_Finger_BT_B000552020-06-27 RomPad3_Finger_BT
RomPad3_Finger_Stérile_B000562020-06-292020-07-02RomPad3_Finger_Stérile
RomPad3_Finger_Violet_B000572020-06-302020-07-03RomPad3_Finger_Violet
RomPad3_Finger_Orange_B000592020-07-012020-07-06RomPad3_Finger_Orange
RomPad3_Finger_Gris_B000602020-07-032020-07-07RomPad3_Finger_Gris
RomPad3_Finger_Jaune_B000622020-07-032020-07-07RomPad3_Finger_Jaune
RomPad3_Finger_Orange_B000632020-07-07 RomPad3_Finger_Orange
RomPad3_Finger_Violet_B000642020-07-07 RomPad3_Finger_Violet

 

I am at a loss as how to do this. Any ideas?

8 Replies

  • Hi Peter_au ,

     

    In you table the last lines don't have any batch information.

    However making use of your data I was abble to make the result crrect for the two top lines Jaune and Gris, as refered believe the difference is on the missing data.

     

    Think it has to do with the way you setup your slicers.

     

    Check PBIX file attach.

    • Peter_au's avatar
      Peter_au
      Helper I

      Hi Miguel,

       

      I think it is getting close.

       

      The data in the table is missing because that is the reality of the input data. There is often no data for the last day and/or there may be missing dates in the table. That is why I need to have a date table attached to allow the user to chose any date available as the other graphics on the report are dependant on those consecutive dates. 

       

      I was trying to avoid an independant date table as I would have to produce a new measure for every graphic on the page.

       

      Cheers

      Peter

       

       

      • MFelix's avatar
        MFelix
        Super User

        Hi Peter_au ,

         

        How do you know were the blank values go to?

         

        When you add the blank lines in the model since theres is no Batch you will get a line with blank and the quantity related with the date.