Forum Discussion
Problem with Totals and Minimum
- Anonymous2 years ago
Hi santigc97
I would like to apologize for the belated reply.
After my test, you can use the following measure:
SalarioMinimo = VAR MinimoValor = SUMX( FILTER( TEST, TEST[Atributo] = "7. SALARY" && TEST[Valor] < 0 && TEST[Weeks] = "W 0-3" ), TEST[Valor] ) RETURN IF(ISBLANK(MinimoValor), BLANK(), MinimoValor)Result:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello!
Thanks for your repply
Find part of my dataset (you need to introduce it as table and call it TEST, also it is in a bad format you can copy paste it).
Note that i want the sum of mins (if the value is positive i prefer to not appear) and with the sum of the totals (-1165-21-4)=-1190 instead of the minimal value that is -1165
Measure 1
| Weeks | Position | Location Risks | Atributo | Valor |
| W 0-3 | Manager | A | 7. SALARY | -1165 |
| W 0-3 | Manager | B | 7. SALARY | -21 |
| W 0-3 | Manager | C | 7. SALARY | -4 |
| W 0-3 | Manager | D | 7. SALARY | 0 |
| W 3-5 | Manager | A | 7. SALARY | 1000 |
| W 3-5 | Manager | B | 7. SALARY | 0 |
| W 3-5 | Manager | C | 7. SALARY | 0 |
| W 3-5 | Manager | D | 7. SALARY | -5 |
Hi santigc97
I would like to apologize for the belated reply.
After my test, you can use the following measure:
SalarioMinimo =
VAR MinimoValor =
SUMX(
FILTER(
TEST,
TEST[Atributo] = "7. SALARY" && TEST[Valor] < 0 && TEST[Weeks] = "W 0-3"
),
TEST[Valor]
)
RETURN
IF(ISBLANK(MinimoValor), BLANK(), MinimoValor)
Result:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.