Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello experts,
I got stuck with this project and can't seem to find a possible solution without creating another table. Basically, I have products in 12M that I need to see if they already exist in the previous years (<>12M). This is what I come up with. Obviously it is not working. Can anyone please take a look and point me to the right direction? Much appreciated!
Solved! Go to Solution.
Hi @danny_dmv ,
According to your description, here's my solution.
Create a calculated column.
Result =
IF (
'Table'[Time] = "12M",
IF (
COUNTROWS (
FILTER (
'Table',
'Table'[Product] = EARLIER ( 'Table'[Product] )
&& 'Table'[Time] <> "12M"
)
) > 0,
"Existing",
"New"
)
)
Or if you prefer a measure.
Measure =
IF (
MAX ( 'Table'[Time] ) = "12M",
IF (
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Product] = MAX ( 'Table'[Product] )
&& 'Table'[Time] <> "12M"
)
) > 0,
"Existing",
"New"
)
)
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @danny_dmv ,
According to your description, here's my solution.
Create a calculated column.
Result =
IF (
'Table'[Time] = "12M",
IF (
COUNTROWS (
FILTER (
'Table',
'Table'[Product] = EARLIER ( 'Table'[Product] )
&& 'Table'[Time] <> "12M"
)
) > 0,
"Existing",
"New"
)
)
Or if you prefer a measure.
Measure =
IF (
MAX ( 'Table'[Time] ) = "12M",
IF (
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Product] = MAX ( 'Table'[Product] )
&& 'Table'[Time] <> "12M"
)
) > 0,
"Existing",
"New"
)
)
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
94 | |
86 | |
78 | |
70 | |
63 |
User | Count |
---|---|
114 | |
101 | |
97 | |
66 | |
59 |