Hi, can anyone help me to understand what logic I need to apply to my existing table in order to return correct data?
Example table with underlying data called 'Table 1';
This is my current visual/table created in Power BI based on the above table with the date slicer to return data for Quarter 3 only;
I need to return the count of distinct postcodes with the time period (Q3) BUT I need to check the previous years' (12 months) data that returned postcodes and if the specific postcodes were queried within 12 months before the start date of Q3 (1st July21), we need to exclude those from the total count for Q3.
Just to give you a better context:
I need to bill my clients quarterly based on the number of calls they make, BUT I don't want to charge them for duplicate calls (postcodes) that were made in the past 12 months before the start date of the quarter.
e.g. client 'ABC ltd' had a total of 73 calls in Q3 but i don't want to charge them for all 73 calls, I want to charge them for unique (distinct) postcodes/calls compared with the past 12 months before start of Q3 (from 1st July 2020 to July 2021). This way we would only charge them for the first search of the postcode each time they search it in a year. Hope that makes sense.
Does anyone have any idea how to make this work? I guess I need to get all calls/postcodes from the quarter I am doing plus the 12 of calls/postcodes prior to that quarter and then return the distinct count of postcodes from that quarter with removed postcodes that were included in the 12 months prior data. How to do that?