Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors