Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
adam_mac
Helper I
Helper I

KPI Visualization card not showing current month

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 

KPI.PNG

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

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

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

8 REPLIES 8
Pragati11
Super User
Super User

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

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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?

 

KPI2.PNG

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

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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

 

KPI2.PNG

Pragati11
Super User
Super User

Hi @adam_mac ,

 

How are you calculating your current month sales?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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

 
CurrentMonthSales = CALCULATE(SUM(Finance_Sales[NetValueBasedOnCommitment]),(DATESMTD(Finance_Sales[PurchaseDate])))

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.