Forum Discussion
Create new table by filtering column value
| Receipt no | BPIS NO | BPIS Date | Mapping status | Count |
| C0093521800662 | 1013x | 30-01-2018 | MAPPED | 3 |
| C0093521800662 | 1013x | 30-01-2018 | MAPPED | 3 |
| C0093521800662 | 1013x | 30-01-2018 | MAPPED | 3 |
| C00935218006623 | 1014x | 29-01-2018 | MAPPED | 2 |
| C00935218006623 | 1014x | 29-01-2018 | MAPPED | 2 |
| C00935218006625 | 1015x | 28-01-2018 | MAPPED | 1 |
| C00935218006626 | 1016x | 28-01-2018 | MAPPED | 1 |
| Receipt no | BPIS NO | BPIS Date | Mapping status | Count |
| C00935218006625 | 1015x | 28-01-2018 | MAPPED | 1 |
| C00935218006626 | 1016x | 28-01-2018 | MAPPED | 1 |
Hi I Finally got the answer,
I created the new table by applying the formula using calculate table function.
Distinctreceiptdump = CALCULATETABLE(Receiptdump,filter(Receiptdump,Receiptdump[Count]=1))
15 Replies
- AnonymousNot applicable
Hi Kumshan450,
If what you want to acheive is a table which contains a set of all the distinct receipt numbers you can do the following
Power Pivot
- Load a blank table to the data model. Instructions can be found here - https://support.office.com/en-us/article/create-a-blank-table-in-power-pivot-4ba54776-f77b-4c3b-adc5-d44e8ae5abbf
- Create a calulated column with the DAX formula =DISTINCT('Receiptdump'[Receipt no])
- This will populate the column with a set of all the distinct receipt number entries and can be used to form relationships
Power BI
If implementing this in Power BI this is slightly easier. You can follow the steps above replacing Step 1 with creating a calculated table and inputting the measure.
Hope this helps.
Kris
- Kumshan450Helper III
Hi, thanks for the reply.
Hi, I want to mention that there are also samples where receipt no is same but the BPIS no in the table are different.Receipt no BPIS NO BPIS Date Mapping status Count C00935218006625 1015x 28-01-2018 MAPPED 1 C00935218006625 1016x 28-01-2018 MAPPED 1
So if I apply distinct (table) I will not be able to get the distinct table.And if I apply distinct (table. ([receipt no]) I will get the distinct table but what about other columns how I will map the BPIS No and date to the distinct table.Please suggest.- AnonymousNot applicable
Hi Kumshan450,
I see. With the table you have posted above you will not be able to use this table to create a relationship on Receipt no as you have multiple instances of the same receipt number. It will help if you can explain why you need to create the relationship and then I will be able to advise, as I can see multiple ways of achiving multiple goals here.
Thanks!
Kris