Forum Discussion

pete1234's avatar
pete1234
Frequent Visitor
1 year ago
Solved

Filter for previous month on KPI visual

Hello,   I have a ticketing system connected to a Power BI database. I have three KPI indicators running down the side. I want to have the target to be exactly the same as the measured value, but f...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Thanks for the reply from some_bih , please allow me to provide another insight:

    Hi, pete1234 

    Regarding the issue you raised, my solution is as follows:

    1.First I have created the following table and the column names and data are the data you have given:

    2. Below are the measure I've created for your needs:

    Current month count = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(TODAY())))
    Last month count = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(TODAY())-1))
    

    3.Here's my final result, which I hope meets your requirements.
     

     Please find the attached pbix relevant to the case.

     

    Best Regards,

    Leroy Lu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.