cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Re: Percent of group total

Hi,

 

I cannot open the file.  Here is the error message i received.  Also, that is a 21.3 MB file.  Please reduce the file down to a couple of MB's.  Thank you.

 

Untitled.png

Re: Percent of group total

Hello,

 

I removed all tables but those referenced for this visual and also removed the older data to reduce the file size.  Interestingly, after making those changges I see that the measure is now displaying the correct percentages.  There must have been an issue with the data causing the erroneous percentages I was seeing previously.

 

Thank you for all your help,

 

- Stacey

Re: Percent of group total

Hi again,

 

Looks like I spoke too soon.  As I look further down I do find where some are still not calculating properly.  In the file found at the following link, please scroll down the visual until you see the name Daniel Robles.  You will see that his Non-Segment Time shows 11.11% and 14.81% where it should show 42.86% and 57.14%

 

https://1drv.ms/u/s!AjomjdFc4LMegbsI9eUJ-veqoPgMUA

 

Thanks,

 

- Stacey

Re: Percent of group total

Also, if you get the error message, then it means you need to open the Power BI application, go to File > Options > Preview Features and check the box for Composite Models.  You then close the app and then reopen Power BI and open the pbix.

 

Thanks,

 

-Stacey

tyw214 Regular Visitor
Regular Visitor

Re: Percent of group total

Hello, I am facing the same problem where the measures work when there are multiple values for a category, but doesn't work when it's a single value. 

 

Can you show me how you fix that problem in that PBI file? Thanks!

Super User
Super User

Re: Percent of group total

Hi,

 

Try this measure

 

Hours%Hierarchy = if(HASONEFILTER(vAllTRData[ActivityName]),[Total hours]/CALCULATE([Total hours],ALLSELECTED(vAllTRData[ActivityName])),if(HASONEFILTER(vAllTRData[TimeIsToSegment]),[Total hours]/CALCULATE([Total hours],ALLSELECTED(vAllTRData[TimeIsToSegment])),[Total hours]/CALCULATE([Total hours],ALL(vAllTRData[TeamMemberName]))))

 

Hope this helps.

Re: Percent of group total

Hello,

 

I'm afraid that is identical to the last measure we tried and it is returning the same results.  

 

- Stacey

Super User
Super User

Re: Percent of group total

It is not identical.  In the revised one, i have used the ALLSELECTED() function.  I tried it and it worked fine.

Re: Percent of group total

I apologize, I should have posted an update.  Yes, the latest measure is working.  It was easier to see the correct percentages by turning off subtotals on the employee level.  It is now clear that it is calculating correctly.

 

Thank you for all of your help!

Super User
Super User

Re: Percent of group total

You are welcome.  If my reply helped, please mark it as Answer.

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 235 members 2,416 guests
Please welcome our newest community members: