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
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
sturlaws
Resident Rockstar
Resident Rockstar

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
Anonymous
Not applicable

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.

sturlaws
Resident Rockstar
Resident Rockstar

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

Anonymous
Not applicable

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

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.