Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
In a financial reports on Intercompany accounting I have 1 slicer that drives the choice on the Company.
With this same slicer I would like to remove the lines that have the same Intercompany code (INTERCO_CD) as the Company Code selected.
I tried to create a measure and to applied the second filter with it on the table.
Solved! Go to Solution.
Hi @Samkar78 ,
Try this.
Measure =
VAR _company_cdForSlicer = VALUES('Table 2'[COMPANY_CD])
VAR _interco_cd = SELECTEDVALUE('Table'[INTERCO_CD])
VAR _compant_cd = SELECTEDVALUE('Table'[COMPANY_CD])
RETURN
IF( NOT ISFILTERED('Table 2'[COMPANY_CD]),
SUM('Table'[AMOUNT]),
IF( NOT _compant_cd IN _company_cdForSlicer,BLANK(),
IF(_interco_cd IN _company_cdForSlicer,BLANK(),SUM('Table'[AMOUNT]))
)
)
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @Anonymous this solution works but... I can't use the orginal slicer which is a hierarchy slicer. I have to click the COMPANY_CD of the unlinked table.
I continue to look for an acceptable solution for users.
thanks @Anonymous that's half of the expected result 😉 you exclude the selected Company Code.
the expected result is this one, based on you example :
The goal is to have 1 Slicer that combine 2 filters :
Hi @Samkar78 ,
Try this.
Measure =
VAR _company_cdForSlicer = VALUES('Table 2'[COMPANY_CD])
VAR _interco_cd = SELECTEDVALUE('Table'[INTERCO_CD])
VAR _compant_cd = SELECTEDVALUE('Table'[COMPANY_CD])
RETURN
IF( NOT ISFILTERED('Table 2'[COMPANY_CD]),
SUM('Table'[AMOUNT]),
IF( NOT _compant_cd IN _company_cdForSlicer,BLANK(),
IF(_interco_cd IN _company_cdForSlicer,BLANK(),SUM('Table'[AMOUNT]))
)
)
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @some_bih ,Thanks for your quick reply, I will add more.
Hi @Samkar78 ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a table
Table 2 = VALUES('Table'[COMPANY_CD])
2.Put field into slicer.
3.Use the following DAX expression to create a measure
Measure =
VAR _company_cd = VALUES('Table 2'[COMPANY_CD])
VAR _interco_cd = SELECTEDVALUE('Table'[INTERCO_CD])
RETURN
IF( NOT ISFILTERED('Table 2'[COMPANY_CD]),
SUM('Table'[AMOUNT]),
IF(_interco_cd IN _company_cd,BLANK(),SUM('Table'[AMOUNT]))
)
4.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@some_bih The data model is pretty simple on this part. I got a fact table 'GL' and a dimension table 'COMPANY'
If add a new column Yes/No based on inter company code , I will remove ALL inter company lines and not specifically the chosen company selected in the Company Slicer.
Hi @Samkar78 based on your data, without model and other details, possible solution
- as you mentioned button is to use bookmark features in Power BI, check link or
- create separate column for intercompany flag with yes / no values (I am reporter for Intercompany :))
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |