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
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

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
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.