Forum Discussion
Show only selected category's value
Hi all,
I have a data set like that;
| InvoiceNo | Material | Category | Value |
| 0001 | A | X | 20 |
| 0001 | B | Y | 30 |
| 0001 | C | Z | 40 |
| 0001 | D | X | 10 |
| 0001 | E | X | 5 |
| 0001 | F | Z | 25 |
| 0001 | G | Y | 30 |
I want to create 2 table chart,
first one shows invoiceNo, Material and value. Second one should be matrix table and show invoiceNo, Material, value and "value of selected category". (I will explain that)
If I click on row 'C' on the left table, it should be return only same category's value with material 'C' on the right table.
(Material C category is 'Z'. Materials with category Z are C and F)
One more example
How can i create a measure to return this value ?
It is really important for me. Waiting for your helps.
Regards
5 Replies
- AnonymousNot applicable
Hi Anonymous ,
You can follow the below steps to achieve it(please check the below screen shot for the details):
1. Create a dimension table Material
2. Create a measure as below
Measure = var _sel=SELECTEDVALUE('Material'[Material]) var _scat=CALCULATE(MAX('Invoices'[Category]),FILTER(ALLSELECTED('Invoices'),'Invoices'[Material]=_sel)) return CALCULATE(SUM('Invoices'[Value]),FILTER('Invoices','Invoices'[Category]=_scat))Best Regards
Rena
- AnonymousNot applicable
Anonymous hi,
First off all thank you for your solution. It is working.
I'm working with direct query option. I wonder that is it possible to do that without creating new table.
I don't want to import data to PBI.
Regards
Gorkem - AnonymousNot applicable
Hi Anonymous btw i tried the below steps, I couldn't get the expected result.
What did I do wrong ? Could you please check my PBIX file ?
Regards
Gorkem - AnonymousNot applicable
Hi Anonymous,
don't care my last reply. I was in mistake. PBI created relation between tables then mine was not working.
It is working now but i want to ask one more question.
I want to do that filtering without filter component. I want to make filtering by clicking on left table.
Is it possible and how ?- AnonymousNot applicable
Hi Anonymous ,
I'm sorry I haven't found any other suitable method except adding a material dimension table to filter the data. If you directly click on material field in the left table, then the right table can only display the corresponding selected material information due to the interactions of visuals and the data display on these two table visual are from the same one table...
Best Regards
Rena