Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Worker | Service | Cost |
James | Initial service | $1 |
Harry | Initial service | $2 |
Steve | Review | $2 |
Harry | Review Comp | $0 |
Steve | Initial Appointment | $3 |
James | Review | $2 |
Steve | Initial Consult | $5 |
James | Review | $2 |
James | Review > 7 | $3 |
Steve | Initial Comp | $4 |
Steve | Initial | $3 |
Solved! Go to Solution.
Share the download link of the PBI file with the 3 visuals already built there.
This is really helpful.
When i run the Is the Service Initial measure, I get the error:
A single value for column 'Item' in table 'Master Activity Report' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
Could it be because my service value descriptions are long. Here is an example:
I do not know the reason. Review my solution carefully and retry.
Sorry, you are correct. It was an error at my end.
However, when I look at my data, the number is Is my service initial? calculation is less then if I run a filter manually, selecting only those services which have the term initial. This is not doing a distinct count is it?
Really appreciate your help.
I do not understand your question. Based on the Table that you shared in the first post, show the expected result.
Sorry if I was unclear.
The table on the far left is from manually filtering the data to select only items with the term initial used.
The middle table is the total number of items per person.
The one on the right is using your code to create a new measure. Given the difference, could your code be counting only distinct codes which contain the word 'initial'?
I would just use the filtered number, but I need Power Bi to do the calculation automatically, hence the need for a new measure.
Sorry to keep coming back to you. I know this is proabaly a really easy issue that I am just not understanding.
Share the download link of the PBI file with the 3 visuals already built there.
Thanks so much Ashish! Your solution has helped me so much!!
Really appreciate your time and expertise!
You are welcome.
@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]) )
And when I try:
Thanks Amit.
I have used the second option, however I get the error saying that 'To use special characters in a measure, enclose the entire name in brackets ( [] ) and add a ] to any closing brackets in the name.
Is the issue in my table or sheet names? Here is my input.
Divide(
Calculate( Count(Master Activity Report[Item]), filter(Master Activity Report, containsstring(Master Activity Report[Item],"Initial"))) , CountMaster Activity Report[Item]) )
Thanks so much for your response.
User | Count |
---|---|
73 | |
70 | |
38 | |
24 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
41 | |
40 |