cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Vick143
Frequent Visitor

Total for my measure is not showing

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])

 Return      CALCULATE([Expected Profit],ALL(),SUMMARIZE(RDM_Contracts,RDM_Contracts[ContractGrp],RDM_Contracts[ContractLyr]),RDM_Contracts[UWYr] =  _uw -1)

Vick143_1-1677526124582.png

 

 

ContractGrpUWYrContractLyrcontractNbrExpected ProfitExpected Profit for last UWYr
AC0126714A19891AC0126714A-1989-128441 
AC0126714A19901AC0126714A-1990-14013728441
AC0126714A19911AC0126714A-1991-13874840137
AC0126714A19921AC0126714A-1992-13722138748
AC0126714A19931AC0126714A-1993-13556837221
AC0126714A19941AC0126714A-1994-19146335568
AC0126714A19961AC0126714A-1996-138000 
AC0126714A19971AC0126714A-1997-13661238000
AC0126714A19981AC0126714A-1998-12781236612
AC0303818B20161AC0303818B-2016-12604000 
AC0303818B20171AC0303818B-2017-153400002604000
AC0303818B20181AC0303818B-2018-175960505340000
AC0303818B20182AC0303818B-2018-2500000 
AC0303818B20191AC0303818B-2019-1154242007596050
AC0303818B20192AC0303818B-2019-255000500000
AC0303818B20201AC0303818B-2020-1432437515424200
AC0303818B20211AC0303818B-2021-142706134324375
AC0303818B20221AC0303818B-2022-112049534270613
2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

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:

vyangliumsft_0-1677829259154.png

 

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

amitchandak
Super User
Super User

@Vick143 , Try like

 

CALCULATE(Sumx(SUMMARIZE(all(RDM_Contracts),RDM_Contracts[ContractGrp],RDM_Contracts[ContractLyr]),[Expected Profit]), RDM_Contracts[UWYr] = _uw -1)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors