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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
pawelj795
Post Prodigy
Post Prodigy

Daily valuation of BOM's (backup table?)

Hi,
I have a quite complicated issue in Power BI.

I have 2 tables.
The first one contains my BOM structure.

The second one contains prices of materials to mentioned BOM's. 
These prices are changing daily.

 

Now, I want to have a valuation of my BOM's for each day.
How to achieve this?

 

Sample file:
https://drive.google.com/file/d/1NVhaRj6YX5xu0cD-W-rscigno_PwBKri/view?usp=sharing

My idea was to create something like a backup table for each day with my BOM's valuation.
Similar topic:
https://community.powerbi.com/t5/Desktop/How-can-i-take-a-monthly-backup-of-my-table-and-insert-it-i...

 

Another idea is to somehow filter table "BOM" with dates from "Prices", but how can I create a relationship with LOOKUPVALUE function?

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @pawelj795 ,

You can update the formula of the calculated column as below:

Cost = 
CALCULATE (
    MAX ( 'Prices'[Unit Price] ),
    FILTER (
        'Prices',
        'Prices'[Component Name] = 'BOM'[Component Name]
            && 'Prices'[Update Date] = TODAY ()
    )
)

yingyinr_0-1622621195717.png

If the above one is not what you want, please provide your expected result with specific example and backend logic. Thank you.

Best Regards

Community Support Team _ Rena
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

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @pawelj795 ,

You can update the formula of the calculated column as below:

Cost = 
CALCULATE (
    MAX ( 'Prices'[Unit Price] ),
    FILTER (
        'Prices',
        'Prices'[Component Name] = 'BOM'[Component Name]
            && 'Prices'[Update Date] = TODAY ()
    )
)

yingyinr_0-1622621195717.png

If the above one is not what you want, please provide your expected result with specific example and backend logic. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pawelj795
Post Prodigy
Post Prodigy

.

Maybe should I use dynamic M query parameters?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.