Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have a table containing date and a count of these dates. I require an IF statement DAX formula to display 'Yes' if the count on a particular date, matches the count of the previous date.
Table A | ||
Date | Counta | Duplicate Count |
01/10/2019 | 150 | No |
02/10/2019 | 100 | Yes |
03/10/2019 | 100 | No |
04/10/2019 | 340 | No |
05/10/2019 | 374 | No |
06/10/2019 | 400 | Yes |
07/10/2019 | 400 | No |
08/10/2019 | 362 | No |
09/10/2019 | 212 | No |
10/10/2019 | 13 | No |
11/10/2019 | 462 | No |
12/10/2019 | 320 | Yes |
13/10/2019 | 320 | Yes |
14/10/2019 | 320 | Yes |
15/10/2019 | 13 | No |
16/10/2019 | 362 | No |
17/10/2019 | 100 | No |
thank you
RIchard
Solved! Go to Solution.
Hi cottera,
Did you want to show bold one as 0? If so, you could try below measure
Measure =
IF (
SUM ( a1[Count] )
= CALCULATE (
MIN ( a1[Count] ),
FILTER ( ALL ( a1 ), a1[DateADDED] = MIN ( a1[DateADDED] ) - 1 )
),
0,
1
)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Maybe you can use this
Measure = IF( CALCULATE( COUNTA(Table1[ID]), FILTER(Table1, Table1[ID] = MAX(Table1[ID])) )>1, 0, 1 )
Stactoverflow solution
May the "BI" force be with you!!! If this post helps, then please consider Accept it as the solution to help the other members find it more quickly! Thanks!
Hi thanks for you quick response. Im sure its nearly there but not quite. I have attached the results I am getting. The ones in bold are the ones I would expect a positive result for
thanks
DateADDED | Count | Measures |
30/10/2019 07:33 | 5896 | 1 |
29/10/2019 07:32 | 5919 | 1 |
28/10/2019 07:33 | 5919 | 0 |
27/10/2019 07:33 | 5919 | 1 |
26/10/2019 07:23 | 5959 | 1 |
25/10/2019 07:22 | 6000 | 1 |
24/10/2019 07:33 | 6126 | 1 |
23/10/2019 07:23 | 6167 | 1 |
22/10/2019 07:32 | 6138 | 1 |
21/10/2019 07:42 | 6138 | 1 |
20/10/2019 07:32 | 6157 | 1 |
19/10/2019 07:32 | 6230 | 1 |
18/10/2019 07:32 | 6250 | 1 |
17/10/2019 11:20 | 6290 | 1 |
16/10/2019 09:52 | 6298 | 1 |
15/10/2019 07:52 | 6250 | 1 |
14/10/2019 07:22 | 6250 | 1 |
13/10/2019 07:32 | 6252 | 1 |
12/10/2019 08:33 | 6293 | 1 |
11/10/2019 07:42 | 6317 | 1 |
10/10/2019 07:23 | 6380 | 1 |
09/10/2019 07:53 | 6404 | 1 |
08/10/2019 07:43 | 6358 | 1 |
07/10/2019 08:03 | 6360 | 1 |
06/10/2019 07:43 | 6361 | 1 |
05/10/2019 07:53 | 6396 | 1 |
04/10/2019 07:53 | 6355 | 1 |
03/10/2019 08:23 | 6400 | 1 |
02/10/2019 07:22 | 6443 | 1 |
01/10/2019 07:33 | 6394 | 1 |
30/09/2019 07:53 | 6394 | 1 |
29/09/2019 07:43 | 6394 | 1 |
28/09/2019 07:43 | 6492 | 1 |
27/09/2019 07:53 | 6519 | 1 |
26/09/2019 07:53 | 6485 | 1 |
25/09/2019 07:53 | 6448 | 1 |
24/09/2019 07:43 | 6448 | 1 |
23/09/2019 07:23 | 6448 | 1 |
22/09/2019 07:32 | 6449 | 1 |
21/09/2019 07:33 | 6530 | 1 |
20/09/2019 07:33 | 6622 | 1 |
19/09/2019 07:32 | 6677 | 1 |
18/09/2019 09:22 | 5834 | 1 |
17/09/2019 08:42 | 5842 | 1 |
16/09/2019 08:42 | 5842 | 1 |
15/09/2019 08:42 | 5843 | 1 |
14/09/2019 08:42 | 5877 | 1 |
13/09/2019 08:42 | 5916 | 1 |
12/09/2019 08:42 | 5961 | 1 |
11/09/2019 08:41 | 6001 | 1 |
10/09/2019 08:41 | 5975 | 1 |
09/09/2019 08:42 | 5975 | 1 |
08/09/2019 08:42 | 5975 | 1 |
07/09/2019 08:42 | 6012 | 1 |
06/09/2019 08:42 | 6053 | 1 |
05/09/2019 08:42 | 6089 | 1 |
04/09/2019 08:42 | 6154 | 1 |
03/09/2019 08:42 | 6104 | 1 |
02/09/2019 08:41 | 6104 | 1 |
01/09/2019 08:42 | 6104 | 1 |
31/08/2019 08:41 | 6137 | 1 |
30/08/2019 08:42 | 6184 | 1 |
29/08/2019 08:42 | 6277 | 1 |
28/08/2019 08:42 | 6296 | 1 |
27/08/2019 08:42 | 6296 | 1 |
26/08/2019 08:41 | 6296 | 1 |
25/08/2019 08:42 | 6297 | 1 |
24/08/2019 08:42 | 6345 | 1 |
23/08/2019 08:42 | 6431 | 1 |
22/08/2019 08:42 | 6471 | 1 |
21/08/2019 08:42 | 6548 | 1 |
20/08/2019 08:42 | 6554 | 1 |
19/08/2019 08:42 | 6554 | 1 |
18/08/2019 08:42 | 6556 | 1 |
17/08/2019 08:42 | 6584 | 1 |
16/08/2019 08:41 | 6660 | 1 |
15/08/2019 08:42 | 6766 | 1 |
14/08/2019 08:42 | 6913 | 1 |
13/08/2019 08:42 | 6939 | 1 |
12/08/2019 08:42 | 6939 | 1 |
11/08/2019 08:42 | 6952 | 1 |
10/08/2019 08:42 | 6937 | 1 |
09/08/2019 08:42 | 6969 | 1 |
08/08/2019 08:45 | 7070 | 1 |
07/08/2019 11:41 | 7070 | 1 |
Hi cottera,
Did you want to show bold one as 0? If so, you could try below measure
Measure =
IF (
SUM ( a1[Count] )
= CALCULATE (
MIN ( a1[Count] ),
FILTER ( ALL ( a1 ), a1[DateADDED] = MIN ( a1[DateADDED] ) - 1 )
),
0,
1
)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |