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

Join 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.

Reply
DiddyO
New Member

Filtering a table based on other table values

Hi,

not sure whether this is somehow possible at all...

I have a table[assets] with some servernames [names] as strings.  And then i have another table that has event informations (like high cpu load on server xyz etc).. this table contains the server names just as part of short_description field...

And now i would like to build a report where i can see which server has which amount of events.. i would have to use the assets table as a kind of filter i guess? and then something with "containsstring" or so.. but i'm lost in the dark

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DiddyO ,

If the abbreviation of the server name in your another table that has event informations is somewhat regular, e.g., it's all the first two characters of the full spelling of name, then you can try the following:

vjunyantmsft_0-1705371864698.png
vjunyantmsft_1-1705371877430.png

vjunyantmsft_2-1705371897917.png

I use this DAX to create a measure:

Measure = 
IF(
    ISFILTERED(assets[names]),
    IF(
        SELECTEDVALUE(event[names]) = LEFT(SELECTEDVALUE(assets[names]), 2),
        1,
        0
    ),
    1
)

vjunyantmsft_3-1705371997316.png

The final output is below:

vjunyantmsft_4-1705372018225.png
vjunyantmsft_5-1705372024925.png

But this is only an example, your specific situation will have to ask you to provide sample data, then I can provide a more accurate solution, thank you!

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
DiddyO
New Member

Thank you for this, had to do some minor adjustents to make it work for me - but it helped a lot. 

 

DiddyO
New Member

Hi & thanks for looking into this. It will not work like that, i need to be a bit more precise.

Table with server-names is rather simple 

Server Name
abcd001-lx1210
abcd001-lx1311
dcef002-lx1420

then there is the event table which contains the short description that includes the server name, but left(3) or so will not work - as it looks like this:

Event/Short Desc.,
(1) too high memory utilzation abcd001-lx1210
(3) dcef002-lx1420 not enough space on folder... 
memory_swap_used_percentage health is high on abcd001-lx1311

hope this makes it more understable.. 

So it would be nice if I could get a kind of count of events reported for abcd001-lx1210 etc.. 

 

best regards

Diddy

 

Anonymous
Not applicable

Hi @DiddyO ,

Please try this way:

Measure = 
VAR A = SELECTEDVALUE('server-names'[Server Name])
RETURN
IF(
    ISFILTERED('server-names'[Server Name]),
    IF(
        CONTAINSSTRING(SELECTEDVALUE(event[Event/Short Desc.,]), A),
        1,
        0
    ),
    1
)

vjunyantmsft_0-1705397317216.png


And use this to count the events:

COUNT_EVENT = 
VAR A = SELECTEDVALUE('server-names'[Server Name])
RETURN
CALCULATE(
    COUNT(event[Event/Short Desc.,]),
    FILTER(
        ALL(event),
        CONTAINSSTRING('event'[Event/Short Desc.,], A)
    )
)

The final output is below:

vjunyantmsft_1-1705397372691.png

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @DiddyO ,

If the abbreviation of the server name in your another table that has event informations is somewhat regular, e.g., it's all the first two characters of the full spelling of name, then you can try the following:

vjunyantmsft_0-1705371864698.png
vjunyantmsft_1-1705371877430.png

vjunyantmsft_2-1705371897917.png

I use this DAX to create a measure:

Measure = 
IF(
    ISFILTERED(assets[names]),
    IF(
        SELECTEDVALUE(event[names]) = LEFT(SELECTEDVALUE(assets[names]), 2),
        1,
        0
    ),
    1
)

vjunyantmsft_3-1705371997316.png

The final output is below:

vjunyantmsft_4-1705372018225.png
vjunyantmsft_5-1705372024925.png

But this is only an example, your specific situation will have to ask you to provide sample data, then I can provide a more accurate solution, thank you!

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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