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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

DAX Help filter

Good morning all,


I need your help for my power BI.

 

Here is my problem, I have a "Stock_Table" table where I have 6 columns

 

  • Date of extraction
  • MaterialCode
  • Factory stock
  • Supplier Stock
  • Needs
  • Remaining stock

Stock table.png

 

what I want to set up in this table is a filter system which is as follows :

 

I want to have a filter that gives me only three possible choices:

  1. A Factory vision
  2. A supplier vision
  3. Global Vision

I then want to create a column in DAX which gives me the remaining stock (stock - needs = remaining stock)

what I want to do is that when I filter on Supplier Vision filter it only takes my supplier stock - needs = remaining stock

or for example: when I filter on Global Vision view, it calculates the remaining stock in this way: (factory stock + supplier stock) - the needs.

Or when I filter on Factory vision, the calculation of the remaining stock column does this way:

Factory stock - Need = remaining stock

 

 

If it is possible I would like not to create a new table but that all are included in the Stock Table 

 

Thanks a lot for your help !

1 ACCEPTED SOLUTION

@Anonymous 
I can open the file successfully, which version of PBI do you have?
I will give you my method.
1st, Create a separate table, without creating relationships with other tables, and put column Vision on the canvas as a slicer

jameszhang0805_0-1613918242724.png

2nd Create a measure just like this and put it in your matrix.

jameszhang0805_1-1613918316517.png

 

View solution in original post

3 REPLIES 3
jameszhang0805
Resolver IV
Resolver IV

Hope it's help 
3.gif

Stock Vision.pbix 

Anonymous
Not applicable

Hello @jameszhang0805 ,

 

many thanks for your help, unfortunately I can't open your PowerBi file.

how do I do it

Capture.PNG

@Anonymous 
I can open the file successfully, which version of PBI do you have?
I will give you my method.
1st, Create a separate table, without creating relationships with other tables, and put column Vision on the canvas as a slicer

jameszhang0805_0-1613918242724.png

2nd Create a measure just like this and put it in your matrix.

jameszhang0805_1-1613918316517.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.