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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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