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.
Hello,
As the post always makred as error I have attached as picture what is my query.
Thanks,
Karthik
Solved! Go to Solution.
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 - plan, plan )
RETURN
result
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 %,
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.
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 %,
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.
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
To learn more about Power BI, follow me on Twitter or subscribe 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 - plan, plan )
RETURN
result
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |