Forum Discussion
Krishna1990_PBI
3 years agoNew Member
Need help on Creating a measure based on another table's Column
I have two tables. I want to create a measure from first table by using second table column. Created a following measure but measure value changes when I click the visuals though I used FILTER with ...
BA_Pete
Super User
3 years agoHi Krishna1990_PBI ,
I may be oversimplifying this, but it looks like you just want to find out the number of computers that have an [ApplicationName] LIKE "CrowdStrike".
If so, then the following should work fine:
_AppCount =
CALCULATE(
DISTINCTCOUNT(Table2[ComputerID]),
CONTAINSSTRING(Table2[ApplicationName], "CrowdStrike")
)
As you have a Table1 ONE : MANY Table2 relationship, this should calculate correctly for different selections of Table1.
If you don't actually need the 'LIKE' comparison, but an 'EQUALS' comparison, then it's even simpler:
_AppCount =
CALCULATE(
DISTINCTCOUNT(Table2[ComputerID]),
Table2[ApplicationName] = "CrowdStrike"
)
Pete