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
mypants
Regular Visitor

Need Help on total percent

Hey All, 

 

I need help on creating a percentage by date, as you know grand total does a percentage based on all data elements.

 

I tried the following: https://community.powerbi.com/t5/Desktop/Percentage-of-total-by-Product/td-p/154838

 

I have tried:

Test = SUM('RPT DeliveryProjection'[TotalDeliveries]) / CALCULATE(SUM('RPT DeliveryProjection'[TotalDeliveries]),FILTER('RPT DeliveryProjection',ALLEXCEPT(['RPT DeliveryProjection'[WeekStarting])))

 

But, I keep getting the error:
Too few arguments were passed to the ALLEXCEPT function. The minimum argument count for the function is 2.

 

Image below - What I need is the percentage column by day (not all time)... (Excuse the datetime, I opened the data in excel and it created the timestamp, it is a date in PBI) 

 

 

things3.PNG

 

Thanks in advance, let me know if you require anymore context?

1 ACCEPTED SOLUTION

Hi,

 

Try this

 

=SUM('RPT DeliveryProjection'[TotalDeliveries]) / CALCULATE(SUM('RPT DeliveryProjection'[TotalDeliveries]),ALLEXCEPT('RPT DeliveryProjection','RPT DeliveryProjection'[WeekStarting]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

The ALLEXCEPT function takes the first input as a Table.  So the ALLEXCEPT portion should be:

 

ALLEXCEPT('RPT DeliveryProjection',['RPT DeliveryProjection'[WeekStarting])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hey thanks, that raises the second error I get:

 

"The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."

 

The whole query:

 

Test = SUM('RPT DeliveryProjection'[TotalDeliveries]) / CALCULATE(SUM('RPT DeliveryProjection'[TotalDeliveries]),FILTER('RPT DeliveryProjection',ALLEXCEPT('RPT DeliveryProjection','RPT DeliveryProjection'[WeekStarting])))

Hi,

 

Try this

 

=SUM('RPT DeliveryProjection'[TotalDeliveries]) / CALCULATE(SUM('RPT DeliveryProjection'[TotalDeliveries]),ALLEXCEPT('RPT DeliveryProjection','RPT DeliveryProjection'[WeekStarting]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

THANK YOU SO MUCH!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.

Top Solution Authors