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.
Hello,
I've been hitting my head on this one for a couple days now, unable to find a solution, although the problem seems quite simple.
Here's a simplified version of my data model, with dummy data at the end of the post :
- Contract table :
- Coverage table (helps to say if a contract is Excluding, Including, Or silently including coverage for a specific risk type) :
The two table are linked 1 to 1 on ContractKey.
In the dashboard I have multiple slicers and visual that leads to a standard table visual (A), in which is displayed the list of selected contracts with some attributes.
When a row is selected in A, I want to display in another visual B (matrix) :
as rows : all the contracts having the same ProgramId as the selected one
as columns : the risk types from the coverage table
as values : the coverage columns of the coverage table (i.e. Excluded, Included, Silent)
- Displaying a matrix with the coverage value isn't an issue, I've managed to do it easily with something like this :
ContractKey | ProgramId | Text |
1 | X | a |
2 | Y | b |
3 | Y | c |
4 | X | d |
5 | X | e |
ContractKey | RiskType | Coverage |
1 | Type1 | Included |
1 | Type2 | Included |
2 | Type1 | Excluded |
2 | Type2 | Included |
3 | Type1 | Silent |
3 | Type2 | Included |
4 | Type1 | Included |
4 | Type2 | Silent |
5 | Type1 | Excluded |
5 | Type2 | Excluded |
E.g. in relation with the below dummy data : If a row with contract 3 is selected in A, i want to display in B
Type1 | Type2 | |
2 | Excluded | Included |
3 | Silent | Included |
Thanks in advance,
Baptiste
@bhanu_gautam , I had tried this thing with the CREATETABLE expression but couldn't work it out, the expression that you gave me returns the error "A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression"
@Baptiste42 , Try using below method
Create a measure to capture the selected ProgramId:
SelectedProgramId =
IF(
ISFILTERED('Contract informations'[ContractKey]),
SELECTEDVALUE('Contract informations'[ProgramId]),
BLANK()
)
Create a measure to filter contracts based on the selected ProgramId:
FilteredContracts =
CALCULATETABLE(
'Contract informations',
'Contract informations'[ProgramId] = [SelectedProgramId]
)
Create a measure to display the coverage values dynamically:
DynamicCoverage =
CALCULATE(
MAX(Coverage[Coverage]),
FILTER(
ALL('Contract informations'),
'Contract informations'[ProgramId] = [SelectedProgramId]
)
)
Set up your matrix visual (B):
Rows: Use ContractKey from the Contract informations table.
Columns: Use RiskType from the Coverage table.
Values: Use the DynamicCoverage measure.
By setting up the matrix visual this way, it will dynamically display the coverage values for all contracts that share the same ProgramId as the selected contract in visual A.
Proud to be a Super User! |
|
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |