Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Help with a calculated column

I am new to PowerBI so please forgive my newbie question here. I have two tables Computers and Software with a one to many relationship. I am trying to figure out how to determine if a ComputerID in the Computers table has Adobe Reader listed in the Software table and if so return a custom value and if not return another value.

 

Computers

ComputerIDDeviceNameNewColumn
1Laptop1 
2Laptop2 
3Laptop3 

 

Software

ComputerIDSoftwareSuite
1Adobe Reader
1Google Chrome
2Google Chrome
2AutoCAD
3Adobe Reader
  • Hi Anonymous 

    create a measure

    NewColumn = IF(CALCULATE(COUNTROWS(Software), Software[SoftwareSuite]="Adobe Reader") > 0, "custom value", "another value")

2 Replies

  • az38's avatar
    az38
    Community Champion

    Hi Anonymous 

    create a measure

    NewColumn = IF(CALCULATE(COUNTROWS(Software), Software[SoftwareSuite]="Adobe Reader") > 0, "custom value", "another value")
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, creating a measure did not seem to work, but using that formula in create a new column did work well.

       

      thanks again