cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User IV
Super User IV

@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])

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
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.

 

 

Super User IV
Super User IV

@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])

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.