Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hanssonnor
Frequent Visitor

Filtering a table on multiple columns and rows - more efficient solution needed

Hi,

 

I am looking for a more efficient solution. I have a table which contains all invoice numbers.

Besides the invoice number the table contains as well three additional columns

 

Case Number: 

- NR-Number: Issues with the invoice

- Protocol-Number: Blocked by Person Number

 

For each NR-Number/Protocol there are always two rows:

- X = Started

- T or W, T = Rejected or W = confirmed

 

I tried to create multiple calculated columns with true and false in order to filter my information.

The information I want to obtain are all "active" NR-Numbers & Protocols, hence those which don't have a " T" or "W" booking.

For one invoice number, you can always have multiple NR-Numbers and Protocol-Numbers.

 

Maybe you have a better solution for me?

Enclosed the table with some examples:

 

InvoiceCase NumberSolutionDescription
40111469NR-0151033XProposal
40111469NR-0151033WCompleted
40112599VLF20-00079XProposal
40112599VLF20-00079WCompleted
40112722VLF20-00079XProposal
40112722VLF20-00079WCompleted
40114265VLF20-00079XProposal
40114265VLF20-00079TCompleted
40117600NR-0152037XProposal
40117600NR-0152037TCompleted
40118401VLF20-00079XProposal
40118401VLF20-00079WCompleted
40119056NR-0152036XProposal
40119056NR-0152036WCompleted
40119772NR-0146105XProposal
40119772NR-0146105TCompleted
40120143NR-0146105XProposal
40120143NR-0146105TCompleted
40120343VLF20-00076XProposal
40120343VLF20-00076TCompleted
40125436NR-0153026XProposal
40125506NR-0153331XProposal
40125513NR-0153331XProposal
40125515NR-0153331XProposal
40125524NR-0153331XProposal
40126650NR-0146968XProposal
40126650VLF20-00061XProposal
40126688NR-0151033XProposal
40126732VLF20-00090XProposal
40126733VLF20-00090XProposal

 

The table is linked with my "Master" table via the invoice number which is unique in the "Master" table.

Besides knowing which invoice still has active NR or Protocol-Numbers, I want to be able to create an overview of all active NR / Protocol Numbers which are currently blocking invoices.

 

Thanks in advance for your hints.

 

Best regards

Hansson

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@hanssonnor , Try a measure like this.

This should give not in "T","W"

countx(filter(summarize(Table, Table[Invoice],Table[Case Number], "_1", calculate(count(Table[Solution]),table[Solution] in {"T","W"})+0),[_1]=0),[Invoice])

 

View solution in original post

2 REPLIES 2
hanssonnor
Frequent Visitor

@amitchandak , thanks for your quick reply.

 

The measure works very well, and it is far easier to create an overview compared to my true & false filters.

 

 

amitchandak
Super User
Super User

@hanssonnor , Try a measure like this.

This should give not in "T","W"

countx(filter(summarize(Table, Table[Invoice],Table[Case Number], "_1", calculate(count(Table[Solution]),table[Solution] in {"T","W"})+0),[_1]=0),[Invoice])

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors