cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Binway Regular Visitor
Regular Visitor

Percentage of count of bands by total for the month

Hi

I have an order table that is connected to a DateDim and an already calculated value for the band of the number of days to completion.

OrderCompleted_date_keyDaystoCompleteBand
120170822<7
220170822<14
320170922<7
420170922<14
520171022<14

I was trying to create a measure as a percentage so that I could graph the counts by month.

Then when I use the DaystoCompletedBand in a slicer I would see the percentage of the total.  So for August with no Band selected I would see 100% but if I select <7 then it would show 50%.

 

Perc = COUNT(ORDERS[ORDER])/CALCULATE(COUNT(ORDERS[ORDER], ALLEXCEPT(DATEDIM,DATEDIM[Month]))

This does not give me correct results but my DAX skills are basic.

Thanks in Advance.

Binway

1 ACCEPTED SOLUTION

Accepted Solutions
richbenmintz
Advisor

Re: Percentage of count of bands by total for the month

If I understand correctly, you are trying to determine the percentage of orders within each band group. the formula below should help. 

 

Please note that it is often easier to get the results you dersire from these % of parent calcs if your dimensional values, DaystoCompleteBand are in a dimension table rather than the fact.

 

Perc = COUNT(ORDERS[ORDER])/CALCULATE(COUNT(ORDERS[ORDER], all(ORDERS[DaystoCompleteBand]))

 

 

View solution in original post

2 REPLIES 2
richbenmintz
Advisor

Re: Percentage of count of bands by total for the month

If I understand correctly, you are trying to determine the percentage of orders within each band group. the formula below should help. 

 

Please note that it is often easier to get the results you dersire from these % of parent calcs if your dimensional values, DaystoCompleteBand are in a dimension table rather than the fact.

 

Perc = COUNT(ORDERS[ORDER])/CALCULATE(COUNT(ORDERS[ORDER], all(ORDERS[DaystoCompleteBand]))

 

 

View solution in original post

Binway Regular Visitor
Regular Visitor

Re: Percentage of count of bands by total for the month

Works like a charm.  I ended up creating a BAND Dim so that I could sort them as they are text and don't sort well.

So the report looks like this

Band.png

With some data below to confirm the %'s

The DAX is

Perc = COUNT(ORDERS[ORDER])/ CALCULATE(COUNT(ORDERS[ORDER]), ALL(BANDS[Band]))

Thanks

 

Binway

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 124 members 1,596 guests
Please welcome our newest community members: