Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi
I'm still a relative newbie to Power BI so please excuse if this is simple - I just can't get my head around what I need to do.
I have a database based on offending. I have an offence table which has a person ID, offence type and offence date. I have also created columns for Year and Quarter (fiscal) based on the offence date.
A person can only have one offence per quarter but can appear in every quarter.
I need my chart to count the number of offences by offence type based on the slicer selection. If I select Quarter, this is fairly straightforward as the number of offences is the same as the number of people. However, if I select year, I only want the chart to count the earliest offence date for each person. I've tried creating a firstdate measure for the offence date but didn't know what to do with it once I had! Any advice would be great. Thank you!
A very simplified example of data below:
Solved! Go to Solution.
Change it to the following measure, measure only considers the current row context, you must set it to ALl(table).
Change it to the following measure, measure only considers the current row context, you must set it to ALl(table).
What does the measure you've written look like?
Also, it's good practice to create a Calendar table for data like this. You can create a relationship between DateOffence and date in the calendar table. Then create the Quarter, Year fields etc in the Calendar table (and not in the Fact table as shown)
It's just a basic