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 all.
I been searching for solution to write a measure that would count a product inventory per ID that is NOT in the last 6 months for "Last Visit". Was able to find previous 6 months or within 6 months in the community.
Sample data:
ID | Description | Inventory Count | Last Visit |
2448354 | TDR3 | 4 | 11/05/22 |
2481554 | UIY1 | 3 | 10/14/22 |
2533754 | OLD2 | 30 | 09/27/22 |
3052811 | OLD3 | 120 | 05/24/22 |
6412102 | ELQ1 | 60 | 03/31/22 |
54001925 | GAD1 | 48 | 03/17/22 |
54023525 | EXA2 | 2 | 09/07/22 |
54317763 | FUR1 | 70 | 10/05/22 |
54327099 | MER2 | 149 | 09/07/22 |
54418425 | RED1 | 453 | 09/09/22 |
69015111 | INL9 | 0 | 03/31/22 |
69019301 | IBR2 | 56 | 02/05/22 |
69018821 | BOS7 | -30 | 06/09/22 |
Solved! Go to Solution.
Hi @Tevon713 ,
According to your description, here are my steps you can follow as a solution.
(1)My test data is the same as yours.
(2) We can create a measure.
Flag =
VAR _datediff =
DATEDIFF ( MAX ( 'Table'[Last Visit] ), TODAY (), MONTH )
RETURN
IF ( _datediff > 6, 1, 0 )
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Tevon713 ,
According to your description, here are my steps you can follow as a solution.
(1)My test data is the same as yours.
(2) We can create a measure.
Flag =
VAR _datediff =
DATEDIFF ( MAX ( 'Table'[Last Visit] ), TODAY (), MONTH )
RETURN
IF ( _datediff > 6, 1, 0 )
(3) Then the result is as follows.
Best Regards,
Neeko Tang
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |