Forum Discussion

Dwalden's avatar
Dwalden
Regular Visitor
2 years ago
Solved

Using a dynamic slicer and measures

Hello Power BI Community! I would love some help. I am relatively new to Power BI and attempting to develop some reports. Ultimately, I am attempting to count rows based on a time period and then ...
  • MNedix's avatar
    MNedix
    2 years ago

    Ok, so let's see if I got this.I had to work with my own data but the logic is still the same. My data went only till 31.12.2023 hence the slider on the top.

    Some explanations:

    - _F_Months_Back is a slider which counts how many months you wanna go back

    - SPLY = Same Period Last Year

    The 1st screenshot shows the situation today. Up till now, there have been 967 calls created (the Calls created until box which is the same as the top right reference box). The day is 31.12.2023. From the beginning of time (2021) and last year on 31.12.2022 were created 284 calls. (SPLY = 284).

    If we go 1 month back (2nd screenshot) we see that:

    - from 01.01.2021 till 30.11.2023 were created 950 calls which means the Delta for December is 17 calls

    - from 01.01.2021 till 30.11.2022, the SPLY, is 256 calls which means that in December 2022 28 calls were created (the Delta SPLY)

    Same logic for screenshot 3.

    To check the logic, we go 12 months back (last screenshot). As you can see, the Calls Created Until box is 284 which is exactly the initial SPLY.

     

    Is this what you were looking for? You can go by days if you want but I thought Months make more sense. I can give you the measures if need be.