cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Create line graph based on % of Row total

Hello,

I want to create a graph that is based on categories within one column.

While I can create a table based on % of row total --I cannot do the same with line graph

Basing graph on pure # of records is visibly misleading.

Please see the example in Excel below

PowerBI question.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Create line graph based on % of Row total

Hi @Anonymous ,

 

It is not clear to me what you are trying to do. And it is further confusing that the data sample you provide, does not correspond to to your excel snapshots.

 

But if you are trying to do what I think you are trying to do, use dax code like this:

Percent of date total =
DIVIDE (
    SUM ( 'Table'[Answers] );
    CALCULATE ( SUM ( 'Table'[Answers] ); ALL ( 'Table'[Category] ) )
)

Add date to the axis, the measure to the value and category as legend.

 

Cheers,

Sturla

View solution in original post

3 REPLIES 3
Super User III
Super User III

Re: Create line graph based on % of Row total

Hi @Anonymous ,

 

It is not clear to me what you are trying to do. And it is further confusing that the data sample you provide, does not correspond to to your excel snapshots.

 

But if you are trying to do what I think you are trying to do, use dax code like this:

Percent of date total =
DIVIDE (
    SUM ( 'Table'[Answers] );
    CALCULATE ( SUM ( 'Table'[Answers] ); ALL ( 'Table'[Category] ) )
)

Add date to the axis, the measure to the value and category as legend.

 

Cheers,

Sturla

View solution in original post

Anonymous
Not applicable

Re: Create line graph based on % of Row total

@sturlaws Thank you ,it worked !
And thank you for feedback.

Anonymous
Not applicable

Re: Create line graph based on % of Row total

For sake of clearence I decided to remove some content from this question, so hopefully other users with the same question will find an answer here.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors