The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I am using following measure to calculate Expected Profit for last UWYr, it basically looks at ContractGrp and ContractLayer and goes back one UWYear and gives Expected Profit. the result is correct except it does not show total. I know the total now showing is pretty commn issue and I tried looking at every solution on this forum but it did not work for me. Thank you very much in advance.
Expected Profit for last UWYr =
var _uw = SELECTEDVALUE(RDM_Contracts[UWYr])
ContractGrp | UWYr | ContractLyr | contractNbr | Expected Profit | Expected Profit for last UWYr |
AC0126714A | 1989 | 1 | AC0126714A-1989-1 | 28441 | |
AC0126714A | 1990 | 1 | AC0126714A-1990-1 | 40137 | 28441 |
AC0126714A | 1991 | 1 | AC0126714A-1991-1 | 38748 | 40137 |
AC0126714A | 1992 | 1 | AC0126714A-1992-1 | 37221 | 38748 |
AC0126714A | 1993 | 1 | AC0126714A-1993-1 | 35568 | 37221 |
AC0126714A | 1994 | 1 | AC0126714A-1994-1 | 91463 | 35568 |
AC0126714A | 1996 | 1 | AC0126714A-1996-1 | 38000 | |
AC0126714A | 1997 | 1 | AC0126714A-1997-1 | 36612 | 38000 |
AC0126714A | 1998 | 1 | AC0126714A-1998-1 | 27812 | 36612 |
AC0303818B | 2016 | 1 | AC0303818B-2016-1 | 2604000 | |
AC0303818B | 2017 | 1 | AC0303818B-2017-1 | 5340000 | 2604000 |
AC0303818B | 2018 | 1 | AC0303818B-2018-1 | 7596050 | 5340000 |
AC0303818B | 2018 | 2 | AC0303818B-2018-2 | 500000 | |
AC0303818B | 2019 | 1 | AC0303818B-2019-1 | 15424200 | 7596050 |
AC0303818B | 2019 | 2 | AC0303818B-2019-2 | 55000 | 500000 |
AC0303818B | 2020 | 1 | AC0303818B-2020-1 | 4324375 | 15424200 |
AC0303818B | 2021 | 1 | AC0303818B-2021-1 | 4270613 | 4324375 |
AC0303818B | 2022 | 1 | AC0303818B-2022-1 | 1204953 | 4270613 |
Hi @Vick143 ,
Here are the steps you can follow:
1. Create measure.
Measure =
IF(
ISINSCOPE('RDM_Contracts'[ContractGrp]),
[Expected Profit for last],SUMX(ALL('RDM_Contracts'),[Expected Profit for last]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Vick143 , Try like
CALCULATE(Sumx(SUMMARIZE(all(RDM_Contracts),RDM_Contracts[ContractGrp],RDM_Contracts[ContractLyr]),[Expected Profit]), RDM_Contracts[UWYr] = _uw -1)
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |