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.
Hi everyone,
Please help me to find solution how to fix my measure.
I have a table and in earch row is calculating measure named "Income", in row in calculate corektly, byt in sum and in cart it calculate incorect. I khow that because of context, but how to write a correct folmula?
My measure is
Income =
VAR rozr =
IF(
SUM('Registr VAT'[SUM])=0 && SUM(RW[SUM])=0,
BLANK(),
(
SUM(FS[SUM])- SUM('Registr VAT'[SUM])-SUM(RW[SUM])
)
)
RETURN rozr
Link to .pbix https://we.tl/t-bPXOmpkpnu
Solved! Go to Solution.
Hi @andrieskoo
Please refer to the sample file with the solution https://we.tl/t-S1IzTm6gBN
Income =
SUMX (
SUMMARIZE ( Contracts, Contracts[ID], Contracts[SIGN_DATE], Contracts[STATUS] ),
VAR VATSUM = CALCULATE ( SUM ( 'Registr VAT'[SUM] ) )
VAR RWSUM = CALCULATE ( SUM ( RW[SUM] ) )
VAR FSSUM = CALCULATE ( SUM ( FS[SUM] ) )
RETURN
IF (
VATSUM <> 0 || RWSUM <> 0,
FSSUM - VATSUM - RWSUM
)
)
Hi @andrieskoo
Please refer to the sample file with the solution https://we.tl/t-S1IzTm6gBN
Income =
SUMX (
SUMMARIZE ( Contracts, Contracts[ID], Contracts[SIGN_DATE], Contracts[STATUS] ),
VAR VATSUM = CALCULATE ( SUM ( 'Registr VAT'[SUM] ) )
VAR RWSUM = CALCULATE ( SUM ( RW[SUM] ) )
VAR FSSUM = CALCULATE ( SUM ( FS[SUM] ) )
RETURN
IF (
VATSUM <> 0 || RWSUM <> 0,
FSSUM - VATSUM - RWSUM
)
)
Thanks a lot!
@andrieskoo , Try like
Income =
VAR rozr =
Sumx(values(Table[ID]),
IF(
SUM('Registr VAT'[SUM])=0 && SUM(RW[SUM])=0,
BLANK(),
(
SUM(FS[SUM])- SUM('Registr VAT'[SUM])-SUM(RW[SUM])
)
)
)
RETURN rozr
Thax, for Your help, but it doesn't workr as I expect
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 |
---|---|
15 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |