I'm starting to understand DAX more - and as soon as I think I'm getting there something like this pops up
I need to show how much business CS brokers have had via wholesale arm of the business. So I wrote this (trying to use VAR when I can)
Go to Solution.
firstly thank you @negi007 , for your input.
I found the error in my DAX. I was using a measure as the value taken in, after replacing this is an explict calculation of the fact table values, the below works like a charm.
My question now is why. Is this something to do with context transition?
Solution to original issue below:
CS as % of Wholesale =VAR WholesaleAmount =CALCULATE (SUM ( fTransactions[GWP] ) + SUM ( fTransactions[FEES] )+ SUM ( fTransactions[ASS PRODS] )+ SUM ( fTransactions[LEGAL] ),FILTER ( 'dDivision etc', 'dDivision etc'[Division] = "Wholesale" ))VAR CSamountInWholesale =CALCULATE (SUM ( fTransactions[GWP] ) + SUM ( fTransactions[FEES] )+ SUM ( fTransactions[ASS PRODS] )+ SUM ( fTransactions[LEGAL] ),FILTER ( dWholesaleBrokers, dWholesaleBrokers[CS/EXT] = "CS" ))VAR CSasPerOfWholesale =ROUND ( DIVIDE ( CSamountInWholesale, WholesaleAmount ), 4 )VAR Result = CSasPerOfWholesaleRETURNResult
View solution in original post
You can create a measure like below to calculate the contribution% of a channel out of total business value
Proud to be a Super User!
Click here to read more about the December 2021 Updates!
Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.
Mark your calendars and join us for our next Power BI Dev Camp!