cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KarthikKV
Helper V
Helper V

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, @KarthikKV ;

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, @KarthikKV ;

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

mahoneypat
Super User
Super User

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


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


View solution in original post

KarthikKV
Helper V
Helper V

@mahoneypat Can you please advise?

KarthikKV
Helper V
Helper V

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!