Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, i am trying to build a simple KPI viz that shows current months sales vs sales target.
The problem i am having is its not showing current month, instead it seems to be showing previous month sales/targets - in this case Dec. I can show current month but only when i filter on the month which isnt very dynamic (and when i do this, the graph dissapears).
Is there a way for this to default to current month? Any help much appreciated
Solved! Go to Solution.
Hi @adam_mac ,
For your KPI visual, you will need to create another measure with just sales for your current month, e.g., January 2021.
You can write a measure as follows:
CurrSales = CALCULATE([CurrentMonthSales],
FILTER(Finance_Sales, MONTH(Finance_Sales[PurchaseDate])= MONTH(TODAY()) && YEAR(Finance_Sales[PurchaseDate])=YEAR(TODAY())))
Now move this measure to the Indicator section of your KPI visual.
Thanks,
Pragati
Hi @adam_mac ,
For your KPI visual, you will need to create another measure with just sales for your current month, e.g., January 2021.
You can write a measure as follows:
CurrSales = CALCULATE([CurrentMonthSales],
FILTER(Finance_Sales, MONTH(Finance_Sales[PurchaseDate])= MONTH(TODAY()) && YEAR(Finance_Sales[PurchaseDate])=YEAR(TODAY())))
Now move this measure to the Indicator section of your KPI visual.
Thanks,
Pragati
so that seems to have worked and i did the same formula for the targets also...however the problem is now that i am missing the graph behind the figures, any ideas how to get it back?
Hi @adam_mac ,
The background area chart in a KPI visual only displays when you are showing a trend over time - this was the case earlier.
But now you are just showing a single month metrics in time (current month), therefore the background area chart has disappeared in your KPI visual.
Thanks,
Pragati
If we are showing the month, does this not count as a trend over time?
HI @adam_mac ,
Your value is aggregated for that single month - so look at it as a single value for the whole month. It hasn't got different value for every single day in that month. It has got same value for every single day in the current month. Therefore no trend in this case.
Thanks,
Pragati
As a work around i created a area chart showing MTD sales by day, placed behind the KPI card and decreased the transparency. Works just as well i think althought i couldnt find anything for conditional formating the colour of the graph to match the KPI card.
Thanks for your help
Hi Pragati, i have tried a few different measures for MTD sales, none seem to work. Below is the current.
With the KPI viz, is it not the trend axis determines the result i.e. if a copy in month it will return the monthly sales target, drag in year, it will return year sales/target etc. ?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |