Forum Discussion
skype_see4d
9 years agoFrequent Visitor
Creating new column / table values based on several conditions
Hello, I am relatively new to Power BI. I got one problem I am trying to solve for a day. I gave up. I have a table with some values - se below. I am trying to write a function to: fill new c...
KarthikSridaran
9 years agoFrequent Visitor
Hello,
The measure that Matt gave works fine,
Other solution:
IF the column Status is a string like "Yes" or "No" kind of values like below
| Nr | Desc | Status1 |
| 90001 | Name1 | Yes |
| 90001 | Name1 | Yes |
| 90001 | Name1 | Yes |
| 90001 | Name1 | No |
| 90001 | Name1 | No |
| 90001 | Name1 | No |
| 90001 | Name1 | No |
| 90001 | Name1 | No |
| 90002 | Name2 | Yes |
| 90002 | Name2 | No |
| 90002 | Name2 | No |
| 90002 | Name2 | No |
| 90003 | Name3 | No |
| 90003 | Name3 | No |
| 90003 | Name3 | No |
| 90004 | Name4 | Yes |
| 90004 | Name4 | Yes |
| 90004 | Name4 | Yes |
Then do the following
measure : CALCULATE(COUNTA(Sheet1[Nr]),Sheet1[Status1]="Yes")
column : IF([Measure]>=1,"True",IF(ISBLANK([Measure]),"False"))
You get the following
| 90001 | Name1 | TRUE |
| 90002 | Name2 | TRUE |
| 90003 | Name3 | FALSE |
| 90004 | Name4 | TRUE |