Forum Discussion

adam_mac's avatar
adam_mac
Icon for Helper I rankHelper I
5 years ago
Solved

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 

  • 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

     

8 Replies

    • adam_mac's avatar
      adam_mac
      Icon for Helper I rankHelper I

      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])))
  • 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

     

    • adam_mac's avatar
      adam_mac
      Icon for Helper I rankHelper I

      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?

       

      • Pragati11's avatar
        Pragati11
        Icon for Super User rankSuper User

        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