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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Filter with DAX

Good morning all !


I ask for your help because I have a problem in my Power BI.

 

I have two tables:

 

  • A "Master table" where I have 4 columns:
    • Date of extraction
    • ABC code
    • MaterialCode
    • Forecast

Master Table.png

  • my second table is called "DAD_Factory" and I have 5 columns:
    • Date of extraction
    • MaterialCode
    • ADI Number
    • ReasonPV
    • Stock

Dad Factory.png

What I want to do is create 3 columns in DAX (or a measure) which will display me

  • the "ADI Number"
  • The "reasonPv"
  • The "Stock"

which is in the column "DAD FACTORY"

 

What I want to do with this report is a kind of historical follow-up, that is to say that when I filter on the date of the extraction with a filter pane, I want that in my master Table I can have my "MaterialCode", "my" Forecast "with my 3 new columns that I would have created

For example :

On January 1st, 2021 my "MaterialCode": 71673 had a forecast of 7K, a stock of 10k, it had 3 ADI Number "381/25624352"/ "385/25624352"/ "388/25624352" and the reason for these PVs was "human problem"/"Failure to respect the order"/ "late delivery".

 

future.png

 

I'm not sure if my request is feasible, but I would need your help!

 

I just want to clarify something too:

A MaterialCode can have more than one ADI code and more than one PV.

 

I tried to create a relation between the two tables with the "MaterialCode" as primary key (see below my relation that I used)

relation.png

 

the problem is that when I want to filter by date code of the extraction, nothing filters correctly

I hope you can help me !!

 

Thanks

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Think about improving your data model. Right now you have two fact tables. You will want to add some dimension tables like the Material Dimension and Calendar Dimension etc.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Think about improving your data model. Right now you have two fact tables. You will want to add some dimension tables like the Material Dimension and Calendar Dimension etc.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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