Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have the a table called attck_table:
attck_table | ||
Attack Name | Protocol | Action |
Attack 1 | http,citrix | Blocked |
Attack 2 | http,oracle | Blocked |
Attack 3 | ipv4, dns | Blocked |
Attack 4 | citrix | Blocked |
Attack 5 | irc | Blocked |
Attack 6 | ipv4,http,citrix | Blocked |
Attack 7 | dns | Blocked |
Attack 8 | imap,smtp | Blocked |
Attack 9 | http | Blocked |
Attack 10 | netbios-ss | Blocked |
Attack 11 | http,ssl,citrix | Blocked |
I already created another table with pre-defined attack name values (manualy) and then I ve created an DAX Function for the "Total" Colum. The DAX Function is exactly that:
total = CALCULATE(COUNTA(attck_table[Column1.protocol]),FILTER(ALL(attck_table),attck_table[Column1.protocol]='desired_table'[protocol])) |
It is reasonably working, but the problem is that it is bring it just the columns that have the exact value, and as you can see, we have "comma" with more values.
desired_table | |
Protocol | Total |
http | 1 |
citrix | 1 |
oracle | 0 |
ipv4 | 0 |
irc | 1 |
dns | 1 |
imap | 0 |
smtp | 0 |
netbios-ss | 1 |
ssl | 0 |
What I want is to use something like "contain", "match", "like" or may be, use some wildcard to bring me all rows that have the value. Here the desired result:
desired_table | |
Protocol | Total |
http | 5 |
citrix | 4 |
oracle | 1 |
ipv4 | 2 |
irc | 1 |
dns | 2 |
imap | 1 |
smtp | 1 |
netbios-ss | 1 |
ssl | 1 |
I know that I can work also with variables poiting to 'desired_table'[Protocols] , but I got the same problem:
Do you guys have any idea?
Thank you so much.
Lucas
In Query Editor, split your Protocol column. Unpivot the resulting columns.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
9 |