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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Problem with Perecentage of totals

Hi experts,

 

I am trying to get from all the users, the percentage of age bins, and this is what I have:

Usuarios.png

 

 

 

 

 

 

 

 

 

The %usrsAgebins it is not correct. I think the problem is that I don't know how to ignore the filters in my measure:

Numb of usersbin = CALCULATE ( 
        NumberOfUsers; 
       KEEPFILTERS( DimFan[AgeRange Label] IN {"<10";">=65";"10-14";"15-19";"20-24";"25-29";"30-34";"35-39";"40-44";"45-49";"50-54";"55-59";"60-64"} )
)

NumberOfUsers =  calculate(DISTINCTCOUNT(UseDevSesDayVid[IdRegistered]); UseDevSesDayVid[IsRegistered]) 

%Usrs AgeBin = DIVIDE(  [Numb of usersbin]; [NumberOfUsers])

I think the problems is How to make the measure "NumberOfUsers ", ignore the filters for agebins and divide each "Numb of usersbin" by 7 (The total of "Numb of usersbin")

 

Thanks experts

1 ACCEPTED SOLUTION

@Anonymous here is the output

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous you posted 2nd solution, and here is the reply for it, add following 3 measures.

 

# Users = 
CALCULATE( 
    SUM( 'UserBin'[Users] ),
    KEEPFILTERS( NOT UserBin[AgeRange] IN { "", BLANK(), "NS/NC" }
) 
)

# Total Users = CALCULATE( [# Users], ALL( UserBin[AgeRange] ))

% Users = DIVIDE( [# Users], [# Total Users] )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

It worked! Thanks a lot @parry2k 

@Anonymous here is the output

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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