Forum Discussion
Using filters in measures/ Applying to a visual
Hi WBscooby ,
Here are the steps you can follow:
1. Create calculated colum.
Related = RELATED('Sales'[RepeatCustomer (groups)])Flag =
IF(
[Related]="No",0,
IF(
[Outcome Level]="High",
IF([NewTransaction]=1,1,0),1
))Flag1 =
IF(
[Outcome Level]="High"&&[Flag]=1,
IF(
[TransactionID]=MAXX(FILTER('SalesTransactions',[Customer ID]=EARLIER([Customer ID])),[TransactionID]),1,0),
IF([Flag]=0,0,1))2. Result
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, this is really helpful. As suggested, I have created some flags on my data using a slightly different methodology because I got a bit confused by the DAX. I now have columns to flag if they are repeat customers for both high and low level outcomes.
I'm struggling to work out how to apply them. I still have is that I want 'High' or 'Low' to be the slicer options. The selection should then filter the pie and other visuals to show if they are repeat customers. On the attached revise mock up, this shows correctly for 'High' but the numbers in the pie are reduced when selecting 'low'. There should always be 10 in the group - For high level filter I only want to count those with a high level of outcome as a repeat customer. For low, only those with a low level of outcome, but the total number of customers should remain the same.
Sorry if I'm not explaining well! I've attached a new file. Thank you