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
ovetteabejuela
Impactful Individual
Impactful Individual

KPI Visualization with Trend

Hi,

 

I'm trying to understand how the KPI visualization works because it changes the value once I insert a trend(ie Date).

 

Can somebody please help me understand this? Below on the left is with trend (Date) and on the right has no trend(actual value throughout the month)

 

 

KPI Visualization.PNG

1 ACCEPTED SOLUTION

Hi @ovetteabejuela,

 

It seems that you are using the custom visual KPI Indicator, right?

 

Based on my test, if you don't specify the date column as trend, it will use total values of Completed and Target to calculate status ( 2995-4500)/4500=-33.4%.

 

q4.PNG

 

If date column is used as trend, it will calculate based on the latest date row follow this formula (211-300)/300=-29.7%.

 

q3.PNG

 

You can create DAX to calculate running total both for the Target and Completed:

 

TargetRunningTotal = CALCULATE(SUM('Table1'[Target]),FILTER(ALL('Table1'),MAX('Table1'[Date])>='Table1'[Date]))
CompeletedRunningTotal = CALCULATE(SUM('Table1'[Compeleted]),FILTER(ALL('Table1'),MAX('Table1'[Date])>='Table1'[Date]))

 

After you add those two measure to the KPI indicator visual, you will get the same result whether add the date column as trend or not. As both the latest date row of running total Target and Completed value, and the total row of running total Target and Completed value are the same.

 

q5.PNG

 

If you have any other doubts about this visual, I would suggest you contact the author of this custom visual by sending email to fredrik.hedenstrom@outlook.com.

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
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

13 REPLIES 13
kurtdn
Advocate I
Advocate I

Just created a suggestion for new custom visual in the new 'Custom visual blog' released recently :

 

https://community.powerbi.com/t5/Custom-Visuals-Ideas/KPI-visual-has-that-option-to-show-the-total-i...

 

feel free to support !

The Card with States visual allows you to sum by values which should be a feature in the other KPI visuals, save having to build workarounds

Phil_Seamark
Employee
Employee

With the KPI visual, the main number shown will always be the latest value in order of date.  The purpose is to show the current number.  So once you add a date column to your Trend property, the KPI can scan your dates and display the value shown for the latest date.

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark,

 

You're right, it was the latest figure. I couldn't find a setting that can show the running % but could it be done?

 

I wanted to show the running % instead of the current one.

A running total (absolute or % values) is a common DAX pattern:

 

http://www.daxpatterns.com/cumulative-total/

 

However, I think you may be best served by using the calculated running total in a bar/line chart and creating a separate card visual for the KPI value (rather than using the KPI visual itself).

 

Can anyone here answer if the trend depicted in the KPI visual would work with a running total?


However, I think you may be best served by using the calculated running total in a bar/line chart and creating a separate card visual for the KPI value (rather than using the KPI visual itself).


 

I was actually hoping to minimize the use of visualizations on a page. It would have been great if the KPI visual has that option to show the running total instead of the rightmost value(it's not the most recent because when I sorted the date in decending order it took the value/% of the first day of the month rather than the latest day - so it's the rightmost entry).

 

Thank you by the way for pointing me out to DAX patterns, another reason why I should start digging in to that topic - I know it's there but I haven't started reading about it yet.

I'm thinking that if you have a running total value by date, then using that value in the KPI visual with the date for trend will give you what you want (the most recent day's value would be the current running total) and the trend would depict how your running total has performed over the time period.

@dkay84_PowerBI wrote:

I'm thinking that if you have a running total value by date, then using that value in the KPI visual with the date for trend will give you what you want (the most recent day's value would be the current running total) and the trend would depict how your running total has performed over the time period.


 

I like the idea, but wondering how the graph would look like.... the graph would probably depict the running total per day and not the daily totals.. Hmmmm... I will try that out(if I can).

Hi @ovetteabejuela,

 

It seems that you are using the custom visual KPI Indicator, right?

 

Based on my test, if you don't specify the date column as trend, it will use total values of Completed and Target to calculate status ( 2995-4500)/4500=-33.4%.

 

q4.PNG

 

If date column is used as trend, it will calculate based on the latest date row follow this formula (211-300)/300=-29.7%.

 

q3.PNG

 

You can create DAX to calculate running total both for the Target and Completed:

 

TargetRunningTotal = CALCULATE(SUM('Table1'[Target]),FILTER(ALL('Table1'),MAX('Table1'[Date])>='Table1'[Date]))
CompeletedRunningTotal = CALCULATE(SUM('Table1'[Compeleted]),FILTER(ALL('Table1'),MAX('Table1'[Date])>='Table1'[Date]))

 

After you add those two measure to the KPI indicator visual, you will get the same result whether add the date column as trend or not. As both the latest date row of running total Target and Completed value, and the total row of running total Target and Completed value are the same.

 

q5.PNG

 

If you have any other doubts about this visual, I would suggest you contact the author of this custom visual by sending email to fredrik.hedenstrom@outlook.com.

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Excellent @v-qiuyu-msft, But I would really prefer to have both the running average or total PLUS the historical data. 

 

Thank you for sharing the email, I think I would try to get in touch with the visual owner and see if he is able to give that option.

I can't share the actual data so I made a smaller version but this yields the same behaviour:

 

 

DateEmployeeCompletedTarget
12/1/20161234551100
12/2/20161234563100
12/3/20161234577100
12/4/20161234537100
12/5/20161234591100
12/6/20161234596100
12/7/20161234582100
12/8/20161234526100
12/9/20161234559100
12/10/20161234553100
12/11/20161234579100
12/12/20161234551100
12/13/20161234583100
12/14/20161234588100
12/15/20161234565100
12/1/20165534229100
12/2/20165534269100
12/3/20165534287100
12/4/20165534251100
12/5/20165534290100
12/6/20165534291100
12/7/20165534272100
12/8/20165534286100
12/9/20165534225100
12/10/20165534233100
12/11/20165534245100
12/12/20165534286100
12/13/20165534297100
12/14/20165534250100
12/15/20165534282100
12/1/20163345263100
12/2/20163345284100
12/3/20163345261100
12/4/20163345234100
12/5/20163345284100
12/6/20163345290100
12/7/20163345289100
12/8/20163345242100
12/9/20163345249100
12/10/20163345228100
12/11/20163345279100
12/12/201633452100100
12/13/20163345246100
12/14/20163345288100
12/15/20163345264100

 

KPI Visualization - tiny dataset.PNG

Running % would probably be a different measure than the one you are using for point-in-time.  Look into TOTALYTD function.

 

Hope this helps.

 

David

For the visual WITH the trend, try setting a visual level filter for Date to the same date range (12/1 - 12/31) and see if it gives you the same value as the other KPI.

 

The other possibility is that their is something up with the measure you are using to calculate your KPI.

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.