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 August 31st. Request your voucher.
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
)
Solved! Go to 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' )))
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
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' )))
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
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.