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
64653463456greg
Frequent Visitor

Percentage per serial number.

I have a bar chart that looks like the attached picture (picture #1).

I have a bunch of serialnumbers that each appear the corresponding number of times in my data set (picture #3).

Each row in the data set is one start up cycle. The 1 in the cycle column is just that, the one start up.

The total per serial is the total number of cycle start ups per serial.

The index is just a way to sort the rows.

With a time slicer I can se how many times a cycle is within a certain minute interwall.

This is what it looks like if I put it in a matrix (picture #2). It KIND OF works, but not really.

 

What I’d like to do next is to create a similar bar chart but with percentages.

What I would like to happen is this:

 

You have the serial numbers in the red square.

The total of cycles in the blue square.

And the total of cycles depending on time in the yellow square. The yellow square numbers change based on the value range in minutes in the time slicer.

What I'd like to get instead of the raw numbers are a percentage based on the total of the column (the numbers in the blue square).

So, in the one with serial number 205 and column total of 15019; there I’d like the 11671 number to instead be 77,71% (picture #2).

Does this make sense?

This all would be best if it could be shown in a bar chart but if I must do it in a matrix, that work as well.

 

 If you can help me in any way that would be so very appreciated.

 

 

HELP.jpgHELP 2.jpgHELP 3.jpg

7 REPLIES 7
danextian
Super User
Super User

Hi @64653463456greg,

Assuming that your column header is of type number, try this:

Percent of Column Header =
IF (
    NOT ( HASONEVALUE ( 'DataTable'[Serial #] ) ),
    DIVIDE ( SUM ( 'DataTable'[Values] ), SELECTEDVALUE ( 'DataTable'[Header Column] ) ),
    SUM ( 'DataTable'[Values] )
)









Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian 

I dont get a value at all when I try your solution.

My Serial Numbers are in text format since they also contain letters.

Like I said before, I don't think what I want to happen is really posible.

Thank you for your reply though. 😄

You will need to create a separate column in Power Query that will extract the numbers only or in the Percent measure, add a condition that will return NA or something else if the serial number cannot be converted to a number.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I don’t think you really understand what I want to get at. I might not be very clear in that regard.

The value I want to extract is a percentage value of a total, where the total 100% is the same value. All dependent on a slicer that slices based on time.

 

Basicaly this.

Lets say the total is 10000. My value based on the slicer is 8000. I want that to show 80%.

But now I just get 100% since thats the total of the sliced value, not the over all total.

I don't really know how to describe it better.

 

Image.jpg

 

 

 

 

 

 

 

 

 

I don’t think what I want is possible. But correct me if I’m wrong. I’ve tried to find a way for the last month.

 

So, the way your describing of extracting the number doesn’t work since the number need to change.

v-stephen-msft
Community Support
Community Support

Hi @64653463456greg ,


Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.


Best Regards,
Stephen Tao

Hi @v-stephen-msft 

It has not been solved.

Your solution with the percentage of a total doesn’t work since I don’t want the percentage of a total but the percentage of a column total. But it always shows 100% since I can’t have a slicer affecting the underlying numbers but not the total.

So, I don’t know if what I want to happen is possible.

v-stephen-msft
Community Support
Community Support

Hi @64653463456greg ,

 

Your [Total Per Serial #] is the value(Y-axis) in the visual, right?

Try to set show value as percentage of grand total.

vstephenmsft_0-1653298145758.png

 

 

 

Best Regards,

Stephen Tao

 

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

 

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.