cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Minakshi
Resolver I
Resolver I

custom card to show actual value and variance

Kindly help me with a custom visual which can show value and variance with up or down arrow or green or red arrow to show actual value and variance.

Thanks in advanced

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Minakshi ,

I created some data:

vyangliumsft_0-1628836673471.png

Custom rules:

Variance: the variance of January and February

Actual value: January and February as a percentage of the total value

Here are the steps you can follow:

1. Create measure.

variance% =
var _month_1=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=1))
var _month_2=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=2))
return
DIVIDE(_month_1-_month_2,_month_1)
actual value =
var _month_1=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=1))
var _month_2=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=2))
var _all=SUMX(ALL('Table'),'Table'[amount])
return
DIVIDE(_month_1+_month_2,_all)

2. Find the KPI chart, place [date] in Trend axis, place [actual value] in Target goals, and place [variance%] in Indicator

vyangliumsft_1-1628836673474.png

3. Result:

vyangliumsft_2-1628836673479.png

 

Best Regards,

Liu Yang

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

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Minakshi ,

I created some data:

vyangliumsft_0-1628836673471.png

Custom rules:

Variance: the variance of January and February

Actual value: January and February as a percentage of the total value

Here are the steps you can follow:

1. Create measure.

variance% =
var _month_1=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=1))
var _month_2=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=2))
return
DIVIDE(_month_1-_month_2,_month_1)
actual value =
var _month_1=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=1))
var _month_2=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),MONTH('Table'[date])=2))
var _all=SUMX(ALL('Table'),'Table'[amount])
return
DIVIDE(_month_1+_month_2,_all)

2. Find the KPI chart, place [date] in Trend axis, place [actual value] in Target goals, and place [variance%] in Indicator

vyangliumsft_1-1628836673474.png

3. Result:

vyangliumsft_2-1628836673479.png

 

Best Regards,

Liu Yang

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

vanessafvg
Super User
Super User

this video is useful in helping you to understand how to use the kpi card https://www.youtube.com/watch?v=zHzSBNES6jE





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

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

Top Solution Authors