cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bheinrich Frequent Visitor
Frequent Visitor

Measure does not show total

Hello,

 

I have a measure that works properly on each row, but does not show the total for all of the rows in the table.  I need to multiple MBOE by NRI and divide the measure by 100.  The Data Category for this measure is greyed out, so i can't force it to show a Sum.

 

NRI_MBOE = IF(HASONEVALUE('Cost Centers'[Cost Center Key]),
    CALCULATE(VALUES(EUR_BOE[MBOE])*VALUES('Well Info'[NRI])/100),
    BLANK())

 

Thanks for any suggestions.

5 REPLIES 5
Super User
Super User

Re: Measure does not show total

Hey,

 

your measure does not a value for the Total because there is no one value for

HASONEVALUE('Cost Centers'[Cost Center Key])

Try this measure instead:

IF(HASONEVALUE('Cost Centers'[Cost Center Key]),
    CALCULATE(VALUES(EUR_BOE[MBOE])*VALUES('Well Info'[NRI])/100),
    
,//HASONEVALUE returns false
CALCULATE(
    SUM(EUR_BOE[MBOE])
    ,ALLSELECTED('Cost Centers'[Cost Center Key])
)
*
CALCULATE(
    SUM('Well Info'[NRI])
    ,ALLSELECTED('Cost Centers'[Cost Center Key])
)
/100
)

Hopefully this provides what you are looking for. Otherwise, please prepare a pbix with sample data, upload the file to onedrive or ropbox and share the link.

 

Regards,
Tom

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
bheinrich Frequent Visitor
Frequent Visitor

Re: Measure does not show total

Thank you Tom! This got me closer.  There is a total showing up now, but it is not the correct total. 

Super User
Super User

Re: Measure does not show total

Hey,

 

I'm sorry for that, please consider to prepare a pbix with sample data, and share the link to the uploaded file (uploaded to onedrive or dropbox)

 

Regards,

Tom

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
bheinrich Frequent Visitor
Frequent Visitor

Re: Measure does not show total

Capture.PNG

 

I figured out that the calculation for NRI_MBOE is taking the total for each column, so it is using the sum of the NRI (which i don't want).  I should back up and start from the beginning on my full needs...

 

I need a Total Drillbit F&D = (Total sum of WI_DCC/Total sum of NRI_MBOE/1000)

*This measure should take the sum of WI_DCC coumn, divide by sum of NRI_MBOE column & divide by 1000.

 

NRI_MBOE = IF(HASONEVALUE('Cost Centers'[Agile Cost Center Key]), CALCULATE(VALUES(EUR_BOE[MBOE])*VALUES('Well Info'[NRI])/100)
    , //HASONEVALUE returns false
    CALCULATE(
        SUM(EUR_BOE[MBOE])
        , ALLSELECTED('Cost Centers'[Agile Cost Center Key])
 )
 *
    CALCULATE(
        SUM('Well Info'[NRI])
        ,ALLSELECTED('Cost Centers'[Agile Cost Center Key])
 )
        /100
 )

 

*I don't want the total to calculate using the sum totals for NRI, but it should use the sum total for the MBOE column.  RIght now, this result is correct by row, just not the total. 

 

WI_DCC = IF(HASONEVALUE('Cost Centers'[Agile Cost Center Key]),
    CALCULATE([Actual]*VALUES('Well Info'[WI]) /100),
    BLANK())

 

*I need the total for this also, but as a sum of the existing rows for WI_DCC.

 

Once i have the correct column totals for NRI_MBOE & WI_DCC, then i can should be able to generate the correct Drillbit F&D measure.

 

I hope this makes sense!

 

 

 

Community Support Team
Community Support Team

Re: Measure does not show total

Hi @bheinrich,

 

As the formulas you shared, there are three tables in your model I think. could you please share the sample data and tell me the relationship between tables?

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 52 members 1,258 guests
Please welcome our newest community members: