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
waterplea
Frequent Visitor

Show a line graph that uses 100% every time period

Greetings,

I'm trying to show a line graph with a time period as x Axis and I wan't every time period to amount to 100%. I see that this is possible by using a slicer for the time period. Example of the data that I want to show:

Hulp PBI 1 voorbeeld wat ik wil.jpg

 

 

 

 

 

 

 

And this is the line graph that I currently have, can I adjust it so that every time period amounts to 100%?:

Hulp PBI 2 voorbeeld wat ik heb.jpg

 

 

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee

@waterplea

I guess that you're showing the "Percentage of grand total"? 

 

Capture.PNG

 

If so, to show as you expected, you'll have to create some measure as below. See more details in the attached pbix file.

 

percentage = DIVIDE(sum(Table5[sales]),CALCULATE(SUM(Table5[sales]),ALLEXCEPT(Table5,Table5[date])))

Capture.PNG

 

View solution in original post

5 REPLIES 5
rthak
New Member

Hello, i have similar problem but i can't seem to get the line graph to total each month at 100%.

 

Below chart totals 100% across all 4 months. I need each month to total 100%.

 

rthak_0-1681670438102.png

I need the line to total to 100% for every month. I have the formula like this 

 

%MONTHLYHAX = calculate(count(HAXTimeService[ClaimID]),ALLSELECTED(HAXTimeService[EffectuationAge]))

 

rthak_1-1681670494424.png

rthak_2-1681670565387.png

 

 

Eric_Zhang
Employee
Employee

@waterplea

I guess that you're showing the "Percentage of grand total"? 

 

Capture.PNG

 

If so, to show as you expected, you'll have to create some measure as below. See more details in the attached pbix file.

 

percentage = DIVIDE(sum(Table5[sales]),CALCULATE(SUM(Table5[sales]),ALLEXCEPT(Table5,Table5[date])))

Capture.PNG

 

Dear Eric,

 

Thank you for sharing how to show a line graph that uses 100% everytime.

 

Now my question to you is how to make this equation more dynamic, so that it takes into account the data hierarchy and date filters. 

 

I am interested in a calculation that is by months. When I use your equation it only works when I use the date at the lowest level (by the day). I am interested in it being 100% per month. Additionally, I would like to take into account that there are different months in a year that could be flexible when date filters are used.

 

 

 

Anyone can solve this problem, show line graph that uses 100% every month period?

@Eric_Zhang

 

Thank you a ton, yesterday I ended up finding this measure to solve my problems but your file will help me greatly in the future.

 

Yesterday I ended up with the following measure and it seemed to work:

% Van respondenten = DIVIDE(COUNTA('TABLE'[Response]); CALCULATE(COUNTA('Table'[Response); ALLEXCEPT('Table';'Table'[Time column]));0 )

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.