Forum Discussion
Need help with DAX for comparison calculation
using DAX to find Max rev and sum BOM qty. I have four core tables UID, PN, BOM, and ICR. Then I duplicate UID, BOM, and ICR to make A and B tables. My goal is to use these to have a comparison report. However, each SO can have multiple revisions (SO + XR = SOR) and the BOM can change with each revision. I want the calculation to auto-select the latest revision when comparing (across multiple SOs not just a single SO).
My model is built as follows:
The end result I want is for the Max rev to only show latest rev BOM in "B" per SO minus latest rev BOM in "A" per SO. I want the math to ignore lower selected revision in the slicers. For example, in this image I want SOB-2 BOM in "B" (ignoring SOB-1 BOM) minus SOB-1 BOM in "A"
Here is BOM table which I duplicated to create tables BOMA and BOMB:
My current DAX:
Please any help would be greatly appreciated.
2 Replies
- lbendlinSuper User
Please read about data models and Star/Snowflake schemas.
Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- zbaker83Frequent Visitor
Thanks for the response... I can't use a star schema as I need a comparison model for the end users.