Forum Discussion
Visualization with a common denominator
Hi,
For people familiar with accounting: I would like to see where do entries from one account go to. As in "other side of a journal entry".
Basically the data is this as in the table below:
| Account | Identifier | Sum |
| 1000 | 565 | 100€ |
| 1100 | 565 | 20€ |
| 1200 | 565 | -120€ |
| 1200 | 572 | -101€ |
| 1300 | 572 | 50€ |
| 1400 | 572 | 50€ |
| 1500 | 572 | 1€ |
| 1600 | 577 | -5000€ |
| 1600 | 577 | 5000€ |
Of course, there will be hundreds of thousands of lines. But the rule is:
1. All Identifiers (565 for example) equal out to zero in the Sum-field.
Goal:
I would like to create a dashboard, where i can filter account 1200 and it would present to me the following:
| Account | |
| 1000 | 100€ |
| 1100 | 20€ |
| 1300 | 50€ |
| 1400 | 50€ |
| 1500 | 1€ |
How do i start to create this? So the function would be like this:
Filter all Identifiers that are in account 1200 (565 & 572 in this case).
If account <> 1200 then SUM the values of these identifiers and show which account they are assigned to
I'm finding it hard to find the logic for this.
If someone could guide me to the right direction, i would be most grateful!
Hi Anonymous
Create a new table
Table 2 = SUMMARIZE('table','table'[Account],'table'[Identifier])Then create measures
Measure = CONCATENATEX(VALUES('Table 2'[Identifier]),'Table 2'[Identifier],",") Measure 2 = CALCULATE ( SUM ( 'table'[Sum] ), FILTER ( 'table', FIND ( 'table'[Identifier], [Measure], 1, 0 ) <> 0 && 'table'[Account] <> SELECTEDVALUE ( 'Table 2'[Account] ) )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- amitchandakSuper User
Try Like
measure = var _value = maxx(allselected(table,table[Account])) return sumx(filter(crossjoin(selectcolumns("Acc1",table[Account],"Iden1",table[Identifiertable[,"_sum1",table[Sum]), selectcolumns("Acc2",table[Account],"Iden2",table[Identifiertable[,"_sum2",table[Sum])) , [Iden1] =[Iden2] && [Acc1]<>[Acc2] && [Acc1] = _value),[_sum2])- AnonymousNot applicable
Hi,
Ive been trying to replicate this but i get lost on the selectcolumns -part of the code. What are the "Acc1, Acc2, Iden1 and Iden2" names? Are these created by the code or should i have them. Also the table[Identifiertable seems like something i dont have.
Basically ive been trying to add this measure to my data. The other solution posted to this thread does work, but it is far to slow. (+20min for my data). I'm hoping this solution might be more efficient.
Thank you for your assistance!
- v-juanli-msftCommunity Support
Hi Anonymous
Create a new table
Table 2 = SUMMARIZE('table','table'[Account],'table'[Identifier])Then create measures
Measure = CONCATENATEX(VALUES('Table 2'[Identifier]),'Table 2'[Identifier],",") Measure 2 = CALCULATE ( SUM ( 'table'[Sum] ), FILTER ( 'table', FIND ( 'table'[Identifier], [Measure], 1, 0 ) <> 0 && 'table'[Account] <> SELECTEDVALUE ( 'Table 2'[Account] ) )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.