Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear All,
In KPI Visualization, it shows last month value rather than YTD. I am using variable to calculate the value and when I go to "Show as a table" I see value is calculated correctly. Only problem is that KPI is showing latest value rather than weighted value.
Thanks for your support in advance.
Solved! Go to Solution.
In your date table, do you have a column for [Year]? If not, create one, and put that in Trend in the visual instead of [Date] and this should fix your KPI.
Here is info on date table if you don't have Year in yours already:
https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@berkbulten What do you mean by 'weighted' value? Can you please provide the formulas, columns and measures you're using in the KPI and also what relationships exist between tables (I'm guessing you have 'month' in the 'trend'? and hope that's in a date table?)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Thanks Allison for your time!
Here the details; as you can see from the below, it shows final month rather than YTD value.
Variable:
KPI
@berkbulten If you want YTD you will need to put Date[Year] in the trend rather than [Date]. KPI built in visual is not very intuitive. A guage visual can be another alternative if you're looking for progress toward a YTD goal. The KPI visual always displays the latest period's value based on what you put in 'trend'.
Also, not sure what the 6.72 refers to as the column headings are cut off in your screenshot?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@berkbulten , I have doubt, there is no ytd is used ?
As per KPI Visual, it does seem like it will show YTD
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-kpi
refer for YOY or YTD
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Sorry, I could not understand what you mean.
My purpose is to show (All Year Sales / All Year Qty). When I choose card rather than KPI, it works. But when I choose KPI, it shows the final value.
In your date table, do you have a column for [Year]? If not, create one, and put that in Trend in the visual instead of [Date] and this should fix your KPI.
Here is info on date table if you don't have Year in yours already:
https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@AllisonKennedy , you are the best! Thank you very much it works when I use year of the date in Trend.
@amitchandak, thank you also!
@berkbulten You are very welcome. It took me ages to figure out how to properly use the KPI visual. 🙂
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |