Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Solved! Go to Solution.
Hi @Anonymous ,
We can try to use the following measure to meet your requirement, the 'Table'[Column] means the first column you used in the table visual:
Inscrição RAP =
SUMX (
SUMMARIZE (
'Table';
'Table'[Column];
"Result";
VAR InscricaoRAP =
CALCULATE (
SUM ( fEmpenho[Saldo - R$ (Conta Contábil)] );
fEmpenho[Conta Contábil] = "622920105"
)
VAR InscricaoRAPLiquidar =
CALCULATE (
SUM ( fEmpenho[Saldo - R$ (Conta Contábil)] );
fEmpenho[Conta Contábil] = "531110100"
)
VAR ReinscricaoRAP =
CALCULATE (
SUM ( fEmpenho[Saldo - R$ (Conta Contábil)] );
fEmpenho[Conta Contábil] = "531210000"
)
VAR InscricaoConsolidada =
SWITCH (
TRUE ();
InscricaoRAP <> BLANK (); InscricaoRAP;
InscricaoRAPLiquidar <> BLANK (); InscricaoRAPLiquidar;
ReinscricaoRAP
)
RETURN
InscricaoConsolidada
);
[Result]
)
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
Hi @Anonymous ,
We can try to use the following measure to meet your requirement, the 'Table'[Column] means the first column you used in the table visual:
Inscrição RAP =
SUMX (
SUMMARIZE (
'Table';
'Table'[Column];
"Result";
VAR InscricaoRAP =
CALCULATE (
SUM ( fEmpenho[Saldo - R$ (Conta Contábil)] );
fEmpenho[Conta Contábil] = "622920105"
)
VAR InscricaoRAPLiquidar =
CALCULATE (
SUM ( fEmpenho[Saldo - R$ (Conta Contábil)] );
fEmpenho[Conta Contábil] = "531110100"
)
VAR ReinscricaoRAP =
CALCULATE (
SUM ( fEmpenho[Saldo - R$ (Conta Contábil)] );
fEmpenho[Conta Contábil] = "531210000"
)
VAR InscricaoConsolidada =
SWITCH (
TRUE ();
InscricaoRAP <> BLANK (); InscricaoRAP;
InscricaoRAPLiquidar <> BLANK (); InscricaoRAPLiquidar;
ReinscricaoRAP
)
RETURN
InscricaoConsolidada
);
[Result]
)
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
I'm unsure exactly how your code is working without more inofmration, but the grand total is not a sum of all the rows.
Instead, it is the DAX calculation with no row level context - the value in "rows" of your matrix.
I suiggest reading this article:
https://powerpivotpro.com/2012/03/subtotals-and-grand-totals-that-add-up-correctly/
Appreciate your Kudos
Connect with me!
Stay up to date on
Read my blogs on
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Could you tell us what you expect the totals to be ? and which lines are in error ?
Help when you know. Ask when you don't!
The lines are corrects, just the grand total are wrong.
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Generally, that kind of problem means there is some issue with the filter context.
if you RETURN each of the VARs do you see the results you expect
for example
Help when you know. Ask when you don't!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |