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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Posts Weekly Oracle database results into Column / Row

Hello,

 

Seeking advice if there is a way to automate the following manual steps:

 

Scenario: We are successfully collecting various Oracle database data on a weekly basis using the Power BI tool.   In this one case because of lack of DAX knowledge we are manually entering weekly results into a column each Thursday.

 

Question: Is there a way for us to automate this process, so that each Thursday update the collected data would place the results into the next available row labeled that Thursday’s date?

 

Thank you in advance for any help,

Don

 

The Power BI table name is "SL_Results"

 

Example below: The "Amount" & "Closed" columns have empty rows slotted for Thursday's weekly updated which is currently being performed manually.

 

 

Week#Weekly DateWeekly Cumulative TargetAmountClosed
2413-Jun-201918581484737
2520-Jun-201918271404722
2627-Jun-201917961244880
274-Jul-201917661137863
2811-Jul-201917351145785
2918-Jul-201917041065878
3025-Jul-20191674965828
311-Aug-20191643874918
328-Aug-20191613812688
3315-Aug-20191582806711
3422-Aug-20191551853505
3529-Aug-20191521837766
365-Sep-20191490819512
3712-Sep-20191459616930
3819-Sep-20191429556649
1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

Do you mean that Thursday is the first day of one week? If so, maybe you could try this:

Amount = 
CALCULATE (
    SUM ( 'Table'[Number] ),
    'Table'[Date] >= EARLIER ( 'SL_Results'[Date] )
        && 'Table'[Date]
            < EARLIER ( 'SL_Results'[Date] ) + 7
)
Closed = 
CALCULATE (
    SUM ( 'Table'[Number] ),
    'Table'[Date] >= EARLIER ( 'SL_Results'[Date] )
        && 'Table'[Date]
            < EARLIER ( 'SL_Results'[Date] ) + 7,
    'Table'[Status] = "Closed"
)

status closed 1.PNG

status closed 2.PNG

This is my PBIX file.

 

Best Regards,
Icey

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Icey
Community Support
Community Support

Hi @Anonymous ,

Do you mean that Thursday is the first day of one week? If so, maybe you could try this:

Amount = 
CALCULATE (
    SUM ( 'Table'[Number] ),
    'Table'[Date] >= EARLIER ( 'SL_Results'[Date] )
        && 'Table'[Date]
            < EARLIER ( 'SL_Results'[Date] ) + 7
)
Closed = 
CALCULATE (
    SUM ( 'Table'[Number] ),
    'Table'[Date] >= EARLIER ( 'SL_Results'[Date] )
        && 'Table'[Date]
            < EARLIER ( 'SL_Results'[Date] ) + 7,
    'Table'[Status] = "Closed"
)

status closed 1.PNG

status closed 2.PNG

This is my PBIX file.

 

Best Regards,
Icey

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Icey,  your help and guidance in this matter is much appreciated Smiley Very Happy.

 

Thank you,

Don

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Maybe you can create relationships between the two tables and create 'Amount' and 'Closed' columns using DAX.

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks Icey,  would you mind sharing the DAX code you kindly suggested which will accomplish addending the "Amount" & "Closed" columns weekly?

parry2k
Super User
Super User

@Anonymous not sure if I fully understood the current process. If your power bi file directly reading data from Oracle table then everytime you refresh power bi report, it will get full data from oracle with all new records. Not sure if this answered your question or I'm missing something here.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

,

Apology, for any missunderstanding - 

  • Current we have 2x tables:
  1. 1x table runs the weekly Oracle query (In this case a SQL "count" statement)
  2. The other table we created and update result from the above SQL query manually.

 

-Don

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.