Forum Discussion
show different values depending on filter, but keep empty rows
Hi,
I need some help with the following:
I have a dataset which contains a BOM and a master file.
BOM: list of materials with their components
Master: list of components per location
What I now want to do is to have the full BOM visible in a table, but I want to add an extra column (measure??) which indicates whether this component is already existing in a certain location. So this depends on who is looking at the report. this then comes from the Master. If the component does not exist in that location, I still want to have the component visible in the table, but with indication 'No' in that extra column. Indication "Yes" if the component does exist.
So for example:
Material A consists of components X, Y and Z. For location Brussels, component X already exists in their location, component Y and Z not. But for location Paris, all 3 components already exist.
If I am viewing the report as location Brussels, I still want to see that material A consists of X, Y and Z, but in the extra column, I want to see 'Yes' (or whatsoever) to indicate that A already exists, while the values is in the rows for component Y and Z should be empty or 'No'
Example for location Brussels
| Material | Component | Already exists? |
| A | X | Yes |
| A | Y | No |
| A | Z | No |
Example for location Paris
| Material | Component | Already exist? |
| A | X | Yes |
| A | Y | Yes |
| A | Z | Yes |
I don't want different columns per location. I want 1 column, which shows me different values, depending on which location is viewing the report (defined by RLS or filtering).
Hi PBInewbee123 ,
According to your description, here's my solution.
Sample:
BOM table:
Master table:
Create a measure:
Already Exist = IF ( COUNTROWS ( FILTER ( ALLSELECTED ( 'Master' ), 'Master'[Component] = MAX ( 'BOM'[Component] ) ) ) > 0, "Yes", "No" )Put Location column in slicer, get the result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- v-yanjiang-msftCommunity Support
Hi PBInewbee123 ,
According to your description, here's my solution.
Sample:
BOM table:
Master table:
Create a measure:
Already Exist = IF ( COUNTROWS ( FILTER ( ALLSELECTED ( 'Master' ), 'Master'[Component] = MAX ( 'BOM'[Component] ) ) ) > 0, "Yes", "No" )Put Location column in slicer, get the result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- PBInewbee123Frequent Visitor
Thank you so much! This works