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

Line Chart - Show Y axis percentage instead of total

Hello,

 

As the post always makred as error I have attached as picture what is my query.

 

KarthikKV_0-1630449284462.png

 

Thanks,

Karthik

2 ACCEPTED SOLUTIONS

Not sure if this is what you mean, but here is a measure that calculates the RT of Plan and Actual separately in variables and then divides those to get your % vs plan.

 

RT % =
VAR actual =
    CALCULATE (
        SUM ( 'Table'[Actual] ),
        FILTER (
            ALLSELECTED ( 'Table'[Date] ),
            ISONORAFTER ( 'Table'[Date], MAX ( 'Table'[Date] )DESC )
        )
    )
VAR plan =
    CALCULATE (
        SUM ( 'Table'[Plan] ),
        FILTER (
            ALLSELECTED ( 'Table'[Date] ),
            ISONORAFTER ( 'Table'[Date], MAX ( 'Table'[Date] )DESC )
        )
    )
VAR result =
    DIVIDE ( actual - planplan )
RETURN
    result

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Please try to change test measure:

 

Test = CALCULATE(SUM([Actual])/[SUM of Plan],FILTER('Table',[Actual]<>BLANK()))

 

and I have seen your PBIx file, in which you want to show %, 

vyalanwumsft_0-1630638276373.png

vyalanwumsft_1-1630638294749.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Please try to change test measure:

 

Test = CALCULATE(SUM([Actual])/[SUM of Plan],FILTER('Table',[Actual]<>BLANK()))

 

and I have seen your PBIx file, in which you want to show %, 

vyalanwumsft_0-1630638276373.png

vyalanwumsft_1-1630638294749.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

mahoneypat
Employee
Employee

Can you provide a link to your pbix file (Google Drive, OneDrive, etc.) or provide your sample data in a copy/paste-able format (insert as table in your post)?  Also, can you provide and example calculation using your values to demonstrate what you need?

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Hello @mahoneypat ,

 

Thanks for your response. Somehow the PowerBI forum is not allowing me to include tables but I have added my test PowerBI file to the below link.

 

https://drive.google.com/drive/folders/1ar9pql7B9fqIAaWTz8zQACAJEvFs282r?usp=sharing

 

There are 4 columns which is Plan, Cumulative Plan, Actual and Cumulative Actual. I am trying to plot a Line chart and I want to show it as percentage instead of total.

 

The comparison to actual vs plan for the respective dates I am not sure how to achieve it as percentage. 

 

On top of that if someone changes the category for example red, blue the percentage should change as well.

 

Thanks,

Karthik

Not sure if this is what you mean, but here is a measure that calculates the RT of Plan and Actual separately in variables and then divides those to get your % vs plan.

 

RT % =
VAR actual =
    CALCULATE (
        SUM ( 'Table'[Actual] ),
        FILTER (
            ALLSELECTED ( 'Table'[Date] ),
            ISONORAFTER ( 'Table'[Date], MAX ( 'Table'[Date] )DESC )
        )
    )
VAR plan =
    CALCULATE (
        SUM ( 'Table'[Plan] ),
        FILTER (
            ALLSELECTED ( 'Table'[Date] ),
            ISONORAFTER ( 'Table'[Date], MAX ( 'Table'[Date] )DESC )
        )
    )
VAR result =
    DIVIDE ( actual - planplan )
RETURN
    result

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

@mahoneypat Can you please advise?

Anonymous
Not applicable

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.