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.
I got data having 2 columns (Product and Age) as below and calculate valid event for each product as shown in "Valid event".
I have tried "Earlier" & Ranking function but could not able get to the full result. Please share your thoughts.
Product | Rank | Age | Valid event | |
A | 1 | 0 | 1 | Default valid event |
A | 2 | 9 | 1 | >= 6 gap from first valid event |
A | 3 | 10 | ||
A | 4 | 12 | ||
A | 5 | 16 | 1 | >= 6 gap from second valid event |
A | 6 | 19 | ||
A | 7 | 22 | 1 | >= 6 gap from Third valid event |
A | 8 | 29 | 1 | >= 6 gap from forth valid event |
A | 9 | 30 | ||
A | 10 | 36 | 1 | >= 6 gap from five valid event |
B | 1 | 0 | 1 | Default valid event |
B | 2 | 1 | ||
B | 3 | 2 | ||
B | 4 | 4 | ||
B | 5 | 6 | 1 | >= 6 gap from first valid event |
B | 6 | 8 | ||
B | 7 | 25 | 1 | >= 6 gap from second valid event |
Hi @Prash1283 ,
What makes an event a default one? Age = 0? Do you have dates?
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Hi ERD
Very first event/age=0/rank=1 all these criteria makes default event. Each event valid event counted as 1.
Using earlier function/ Variable able to identify >=6 age. but in some cases like below 16 is valid event and next 22 is valid event but in power bi I could not able to figure how to conditionly earlier valid record with current if corrent row didn't satisfy the >=6 condition.
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |