Forum Discussion
Grouping column values and setting a flag based on another column's value?
- 4 years ago
Hi,
Here is one way to do this:Measure 15 = if(CALCULATE(CONTAINS('Temperature (2)','Temperature (2)'[Temperature],"Warm"),ALLEXCEPT('Temperature (2)','Temperature (2)'[GRP])),1,0)This measure checks if a group contain "Warm" and will return 1 to all rows where this is the case.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Hi,
Here is one way to do this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
ValtteriN
Can I use a wildcard within the syntax to get groups that start with DS? Here is the syntax I am using to get one group:
DS Assigned = if(CALCULATE(CONTAINS('Incident History','Incident History'[Assigned Group],"DS_Unity"),ALLEXCEPT('Incident History','Incident History'[Incident #])),1,0)
I tried this but had no luck:
DS Assigned = if(CALCULATE(CONTAINS('Incident History','Incident History'[Assigned Group],"DS_*"),ALLEXCEPT('Incident History','Incident History'[Incident #])),1,0)
How would I use a wildcard within the syntax to search any group that starts with 'DS'?
- ValtteriN4 years ago
Community Champion
Have a look at CONTAINSSTRING:
e.g.
wildcard =CONTAINSSTRING(max(Temperature[Temperature]),"Warm")
non-wild =CONTAINS(Temperature,Temperature[Temperature],"Warm") - bballjoe124 years agoFrequent Visitor
How would I change this syntax to use it in creating a new table rather than just a measure?
DS Assigned = if(CALCULATE(CONTAINS('Incident History','Incident History'[Assigned Group],"DS_Unity"),ALLEXCEPT('Incident History','Incident History'[Incident #])),1,0)