Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
What we want to achieve is shown in the image.
If the Code is "AAA", the "Value" is aggregated with the same Num2 (e.g. B731 or B867).
For example... Code is AAA and Num2 is B731.
Code is AAA and Num2 is B731 has two Values ("100" and "-100").
When the two "Values" are aggregated, the result is 100+(-100), so the result is 0.
We want to output this "0" result to the two rows of B731.
If Code is not "AAA", the data is totaled by "Num1".
In summary, I think it goes like this.
Is it possible to achieve this with a major? Or is there some way to have it calculated in a computed column?
I tried to group them in the Power Query Editor, but It did not work.
If anyone has any good ideas or methods, please let me know.
Best regards, Lopez
Solved! Go to Solution.
Hi @Lopez0090
Thanks for reaching out to us.
>>
In summary, I think it goes like this.
You can try this,
Column =
IF (
'Table'[Code] = "AAA",
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Num2] = EARLIER ( 'Table'[Num2] ) ),
[Value]
),
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Num1] = EARLIER ( 'Table'[Num1] ) ),
[Value]
)
)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Lopez0090
Thanks for reaching out to us.
>>
In summary, I think it goes like this.
You can try this,
Column =
IF (
'Table'[Code] = "AAA",
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Num2] = EARLIER ( 'Table'[Num2] ) ),
[Value]
),
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Num1] = EARLIER ( 'Table'[Num1] ) ),
[Value]
)
)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much.
Actually, I need to use a dynamically calculated Value (measure) at [Value], and I would like to express this expression in a measure, is it possible to create it in a measure?
Hi @Lopez0090
Thanks for your reply.
You can try this
measure=
IF (
min('Table'[Code] )= "AAA",
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Num2] = min( 'Table'[Num2] ) ),
[Value]
),
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Num1] = min( 'Table'[Num1] ) ),
[Value]
)
)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
My English is not very good, so please let me know if I am not very clear.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
42 |