Forum Discussion

adnankabina's avatar
adnankabina
Helper II
10 months ago
Solved

logic on two column from different table

I have two table joined with PO and DC columns both exists in both table and created a relationship. I have YYYYWK 202534 in first table and YYYYWK  202545 from second table. I want to put condtion i...
  • v-hjannapu's avatar
    v-hjannapu
    10 months ago

    Hi adnankabina,

    I have tried to reproduce your scenario in Power BI and used sample data with Zone and DC combination. The DAX has been modified to use MAX() inside CALCULATE so it works even when there are duplicate Zone–DC rows.

    The result now flags as Live when the YR_WK is greater than the tracker week, Not Live otherwise, and No Tracker when there’s no matching record.

    I’m attaching a sample PBIX file for your reference  you can check the DAX and visuals for better understanding.

    Hope this helps if you have any queries we are  happy to assist you further.
    Best Regards,
    Harshitha.