Forum Discussion
a3810
2 years agoNew Member
Calculating a ratio based on partial text values
Sorry if this question seems too simple, but I am looking for a way to insert a quick measure which calculates the ratio of certain values. Worker Service Cost James Initial serv...
- 2 years ago
Share the download link of the PBI file with the 3 visuals already built there.
amitchandak
2 years agoSuper User
a3810 , based on what I got
Divide(
Calculate( Sum(Table[Cost]), filter(Table, containsstring(Table[Service],"Initial"))) , Sum(Table[Cost]) )
or
Divide(
Calculate( Count(Table[Service]), filter(Table, containsstring(Table[Service],"Initial"))) , Count(Table[Service]) )
a3810
2 years agoNew Member
And when I try:
Measure 2 = Divide(
Calculate( Sum('Master Activity Report'[Item]), filter('Master Activity Report', containsstring('Master Activity Report'[Item],"Initial"))) , Sum('Master Activity Report'[Item]) )
It gives a red error over "Initial"
The word initial is part of the code description. Should it start with an * as it is a partial match?
Thanks again.