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 have an unique screnario which i am at wits end trying to resolve. The data looks like below, where each user has number of hours worked for a week. The hours can have any value greater than 0.
username | hours | start week | end week |
A | 40 | 7/4/2021 | 7/10/2021 |
A | 36 | 7/11/2021 | 7/17/2021 |
A | 34 | 7/18/2021 | 7/24/2021 |
A | 30 | 7/25/2021 | 8/1/2021 |
B | 50 | 7/4/2021 | 7/10/2021 |
B | 20 | 7/11/2021 | 7/17/2021 |
B | 20 | 7/18/2021 | 7/24/2021 |
B | 20 | 7/25/2021 | 8/1/2021 |
C | 28 | 7/4/2021 | 7/10/2021 |
C | 32 | 7/11/2021 | 7/17/2021 |
C | 44 | 7/18/2021 | 7/24/2021 |
C | 50 | 7/25/2021 | 8/1/2021 |
I want to add a dropdown to the visual where the user can select a value for number of hours(5,10,20, 30,35 etc).
If the latest hour value(based on dates) is greater than the value selected, ignore that user.
If the latest hour value(based on dates) is less than value selected, select user and get end date of period where its higher.
For e.g. if the user selects 35, the output will be :
end of week | |
A | 7/17/2021 |
B | 7/10/2021 |
In the above,
A | 36 | 7/11/2021 | 7/17/2021 |
row is higher than the 35 hour, so select that row and not the row above.
For B, a similar logic applies.
Please let me know if you have any ideas how to proceed with this. Thanks in advance.
Solved! Go to Solution.
Here is a measure expression that works with your username column in a table visual, and a disconnected table with GENERATESERIES for the slicer.with
Latest Week Over Limit =
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Here is a measure expression that works with your username column in a table visual, and a disconnected table with GENERATESERIES for the slicer.with
Latest Week Over Limit =
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Your are awesome! Much appreciated.
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 |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |