The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Good morning,
I need to add up the column, but if the total is negative, I have to show zero.
But in the column must appear the negative numbers.
I tried to make this measurement, but it's giving me 0,00 in the column and I can't show the negative number.
Thank you for your help
Solved! Go to Solution.
@leandrocsouza
If you have a category column use it in place of SALDO - FORÇAS ESTADUAIS inside INSCOPE.
Medida =
VAR __Sum = SUM ( 'TABELA REPASSE'[SALDO - FORÇAS ESTADUAIS] )
Return
IF(
ISINSCOPE ( TABELA REPASSE'[SALDO - FORÇAS ESTADUAIS]),
TABELA REPASSE'[SALDO - FORÇAS ESTADUAIS],
IF ( __Sum < 0 , 0, __Sum)
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thanks a lot for the help !
OBRIGADO ! 😁
@leandrocsouza
If you have a category column use it in place of SALDO - FORÇAS ESTADUAIS inside INSCOPE.
Medida =
VAR __Sum = SUM ( 'TABELA REPASSE'[SALDO - FORÇAS ESTADUAIS] )
Return
IF(
ISINSCOPE ( TABELA REPASSE'[SALDO - FORÇAS ESTADUAIS]),
TABELA REPASSE'[SALDO - FORÇAS ESTADUAIS],
IF ( __Sum < 0 , 0, __Sum)
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Do you want to just sum the positive values?
I want to add up all the values, positive and negative. But if the total is negative, I want to show 0.
But column information must remain negative numbers.
See if this example helps you.
Medida =
VAR ListItens =
VALUES ( Tabela1[ID] )
VAR Result =
IF (
HASONEVALUE ( Tabela1[ID] ),
SUM ( Tabela1[VALOR] ),
0
)
RETURN
Result
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
82 | |
65 | |
53 | |
52 |
User | Count |
---|---|
128 | |
117 | |
78 | |
65 | |
63 |