Forum Discussion
percentages
Hi .. I posted a question a moment ago but cannot find it .. I must say I find this forum tricky to navigate .. anyway I'm looking for adivice on how to obtain a %. I have to fields: Forcast and Warehouse as shown below
The calc I have used is: aaFill measure column 4 = if(sum('Ops Data'[aQtyEXTRACT Stock on Hand])<>BLANK(),Calculate(sum('Ops Data'[aQtyEXTRACT Forecast Qty])))
As you can see the one warehouse has a 3 based on the calc while the other just brings in the values .. I need to divide 3/14 to return a % .. however in the line graph I am using you need to insert the warehouse field into the axis or the legend for this to work ... but I need to build that into the calc somehow ... any help would be much appreciated.
Hi MarcUrdang ,
According to your description, here's my solution.
Create a measure.
aaFill measure column 2 = DIVIDE ( [aaFill measure column 4], CALCULATE ( SUM ( 'Ops Data'[aQtyEXTRACT Forecast Qty] ), ALL ( 'Ops Data' ) ) )Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
3 Replies
- amitchandak
Super User
new measure = divide(sum('Ops Data'[aQtyEXTRACT Stock on Hand]), Calculate(sum('Ops Data'[aQtyEXTRACT Forecast Qty]), allselected()))
- MarcUrdang
Post Patron
HI Amit .. nice to hear from you again ... long time 🙂
I see that the calc at least works better but still not accurate ... I remember we Skyped last time .. if you would be willing to take another call sometime today I would be happy to pay for your time ... I'm sure 10 mins would put this to bed ..
thx
Marc
- v-yanjiang-msft
Community Support
Hi MarcUrdang ,
According to your description, here's my solution.
Create a measure.
aaFill measure column 2 = DIVIDE ( [aaFill measure column 4], CALCULATE ( SUM ( 'Ops Data'[aQtyEXTRACT Forecast Qty] ), ALL ( 'Ops Data' ) ) )Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please considerAccept it as the solution to help the other members find it more quickly.