Forum Discussion
Grouping values in a column then multiply
- Anonymous6 years ago
Hello icdns,
Please try below code :
CalculatedFinal% = VAR _Service= 'Table'[SERVICE] VAR _Result=PRODUCTX(filter('Table','Table'[SERVICE]=_Service),'Table'[PERCENTAGE]) Return _ResultThanks!
- 6 years ago
Hi icdns ,
- How can I create a column to group the Apps by Service.
- Next, after I group the the apps by service column. How will I create the FINAL PERCENTAGE column? (Formula is just 98.99% x 98.88%)
For the two demands, you may create a calculated column like DAX below to get [FINAL PERCENTAGE], then put the column [SERVICE] , [APPNAME] , [PERCENTAGE] and new created column [FINAL PERCENTAGE] into Table visual, sort the table visual by [SERVICE], in this way, it will group the Apps by Service.
FINAL PERCENTAGE = VAR _Service='Table1'[SERVICE] RETURN PRODUCTX(FILTER('Table1','Table1'[SERVICE]=_Service),'Table1'[PERCENTAGE])In addition, you may select on this column, go to Column Tool, set it as Percent format , and set decimal places.
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
1. How can I create a column to group the Apps by Service. For example:
| SERVICE | APPNAME | PERCENTAGE |
| Service A | App1 | 98.99% |
| Service A | App2 | 98.88% |
| Service B | App3 | 100.00% |
| Service B | App4 | 98.54% |
| Service B | App2 | 98.88% |
| Service B | App5 | 100.00% |
| Service C | App1 | 98.99% |
| Service C | App3 | 100.00% |
| Service C | App4 | 98.54% |
| Service C | App2 | 99.04% |
2. Next, after I group the the apps by service column. How will I create the FINAL PERCENTAGE column? (Formula is just 98.99% x 98.88%)
It's just multiplying the percentage of App1 and App2
| SERVICE | APPNAME | PERCENTAGE | FINAL_PERCENTAGE |
| Service A | App1 | 98.99% | 97.88% |
| Service A | App2 | 98.88% | 97.88% |
Hi icdns ,
- How can I create a column to group the Apps by Service.
- Next, after I group the the apps by service column. How will I create the FINAL PERCENTAGE column? (Formula is just 98.99% x 98.88%)
For the two demands, you may create a calculated column like DAX below to get [FINAL PERCENTAGE], then put the column [SERVICE] , [APPNAME] , [PERCENTAGE] and new created column [FINAL PERCENTAGE] into Table visual, sort the table visual by [SERVICE], in this way, it will group the Apps by Service.
FINAL PERCENTAGE =
VAR _Service='Table1'[SERVICE]
RETURN
PRODUCTX(FILTER('Table1','Table1'[SERVICE]=_Service),'Table1'[PERCENTAGE])
In addition, you may select on this column, go to Column Tool, set it as Percent format , and set decimal places.
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.