Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Again
This challenge has me beat as I can calculate averages where 2 basic criteria are needed but my new challenge is;
To create a measure that calculates a total average score for where every row that contains the text "OX" but not "LOX"
The columns are
Name: This one will contain the items which will have "OX" and "LOX" within the text string (example - Oxtail, Oxford, Loxing)
Score: This will have a value from 1 - 5 as a score and only 1 score per row
I'm pretty stumped as I don't really know how to look for parts of text strings to search for those matches
Again, any code/links/videos etc with examples of this would be great
Thanks
Dan_B
Solved! Go to Solution.
Hi @Daniel_B ,
Is this problem sloved? If not, please let me know.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hello @Daniel_B
You can use CONTAINSSTRING to check for that so something like this:
Measure =
CALCULATE( AVERAGE( Scores[Score] ),
CONTAINSSTRING ( Scores[Name],"OX" ),
NOT ( CONTAINSSTRING ( Scores[Name], "LOX" ) )
)
I tried that but when I try to add the measure to a scorecard it only "Can't Display the Visual" or BLANK even though there are lines that contain Ox somewhere within the string
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |