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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MarcUrdang
Post Patron
Post Patron

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.

MarcUrdang_0-1647796361733.png

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
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.

vkalyjmsft_0-1648093056352.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yanjiang-msft
Community Support
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.

vkalyjmsft_0-1648093056352.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@MarcUrdang ,

new measure = divide(sum('Ops Data'[aQtyEXTRACT Stock on Hand]), Calculate(sum('Ops Data'[aQtyEXTRACT Forecast Qty]), allselected()))

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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