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
I have a matrix visual with account numbers as columns, journal numbers as rows and amounts as values, ex:
1000 2000 3000 4000
101 10 -10
102 20 -20
103 35 -5 -30
104 50 -50
I have added a slicer for account number. When I filter on an account number, I want the matrix to show me the journal numbers with values on this account number, and also the corresponding account numbers/values. For example, if i filter on account number 3000, this is how I want the matrix to look like:
1000 2000 3000
102 20 -20
103 35 -5 -30
I have tried using different measures, but they all seem to return only the account number I have filtered on. Help is highly appreciated 😄
Solved! Go to Solution.
Hi, @mlbo
You can try the following methods. Create a new slicer table.
Slicer = VALUES('Table'[account number])
Measure =
Var _table=CALCULATETABLE(VALUES('Table'[journal number]),FILTER(ALL('Table'),[account number]=SELECTEDVALUE(Slicer[account number])))
RETURN
IF(SELECTEDVALUE('Table'[journal number]) IN _table,1,IF(SELECTEDVALUE(Slicer[account number])=BLANK(),1,0))
Is this your desired outcome? Please review the attachment.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @mlbo
You can try the following methods. Create a new slicer table.
Slicer = VALUES('Table'[account number])
Measure =
Var _table=CALCULATETABLE(VALUES('Table'[journal number]),FILTER(ALL('Table'),[account number]=SELECTEDVALUE(Slicer[account number])))
RETURN
IF(SELECTEDVALUE('Table'[journal number]) IN _table,1,IF(SELECTEDVALUE(Slicer[account number])=BLANK(),1,0))
Is this your desired outcome? Please review the attachment.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That worked just the way I wanted! Thank you so much for helping me
Hi @mlbo
you should have a table for your journal numbers (lets call it DimJournal which contains all unique journal numbers) then you should use it as row of your matrix. then write a measure as follows:
measure val := var _selectedjournal = selectedvalue (DimJournal [Journal Id])
return
calculate (sum( your_table [value]) , filter (your_table , your_table [journal Id] = _selectedjournal))
** do not create any relationship between your table and Dimjournal
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Thank you for answering. I tried your solution, but the matrix still only shows the account number that is filtered on, and not the others.
there was a misunderstanding between account and journal. sorry for that. as you want to select an account so you should have account numbers as a unique table (lets call it DimAccount) and then you should use it as slicer. then write a measure as follows:
measure val := var _selectedjournal = selectedvalue (DimAccount [Account Id])
var _selectedjournal= summarize (filter (all(your_table) , Account in _selectedjournal) , your_table[journal])
return
calculate (sum( your_table [value]) , filter (your_table , your_table [journal Id] in _selectedjournal))
the columns of matrix should selected from your_table and there should not be any relation between these two tables.
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |