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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jhowe1
Helper III
Helper III

Reference measure in another calculation

I have a measure which simply switches values depending on which currency is selected as bottom query, how do I calculate a percentage of this value, or reference NSV in any other measure? Say for example below, thanks.

 

 

% of NSV =
SUM ( [NSV] )
    / CALCULATE (
        SUM ( [NSV] ),
        ALL ( '30 Product'[Product] )
    )

 

 

 

NSV =
VAR _AccountingCurrencyCalculation =
    SUM ( '01 Sales Invoice'[NSV_AccountingCurrency] )
VAR _ReportingCurrencyCalculation =
    SUM ( '01 Sales Invoice'[NSV_ReportingCurrency] ) // if a currency is selected it will use that otherwise it will default to reporting currency
VAR _Currency =
    SELECTEDVALUE ( 'Currency Selection'[Choose Currency], "Reporting Currency" )
RETURN
    IF (
        _Currency = "Accounting Currency",
        _AccountingCurrencyCalculation,
        _ReportingCurrencyCalculation
    )

 

 

1 ACCEPTED SOLUTION

This was close however I needed to use calculate as SUM wouldn't work and filter by whole product table not referencing a column. 

 

% of NSV = DIVIDE( [NSV] , CALCULATE ( [NSV] , ALL ('30 Product' )))

View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @jhowe1 

I'm not sure what your data looks like but assuming '30 Product'[Product] contains numbers try this

 

% of NSV = DIVIDE( [NSV] , SUM ( ALL ( '30 Product'[Product] )))

 

[NSV] is already a SUM of values so you don't need to do it again.

If this doesn't work please supply some sample data so I can see your table structure.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


This was close however I needed to use calculate as SUM wouldn't work and filter by whole product table not referencing a column. 

 

% of NSV = DIVIDE( [NSV] , CALCULATE ( [NSV] , ALL ('30 Product' )))
PhilipTreacy
Super User
Super User

Hi @jhowe1 

I'm not really clear on the problem.  You've created a measure called NSV and you want to know how to reference that in another measure?  Exactly as you have e.g.

 

SomeMeasure = DIVIDE( [NSV] , 1)

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Thanks for the response, I cannot do below it says 'parameter is not the correct type' and errors. I can only sum physical column, not measure.

 

% of NSV =
SUM ( [NSV] )
/ CALCULATE (
SUM ( [NSV] ),
ALL ( '30 Product'[Product] )
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.