The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Good morning
I'm doing internships at a mechanical services company, and I'm using Power BI to analyze the hours worked per mecáncio, and the overtime they do. To calculate this last I have created a very simple calculated field, since I do not have much knowledge of DAX, and the calculated field is this: EX = SUM(Parts[Hours]) - (8)
The visual I have right now is this, where I've applied different rules so that only overtime is highlighted in red, and in yellow they appear on Saturdays.
What I want to achieve is to obtain the sum of overtime worked by mechanic and that the design is much cleaner, since when I expand the data by mechanic all the work reports of all the years appear, and not only those corresponding to the selected date range, which makes it very difficult to find where that mechanic has worked every day. I only have this last problem when I add the ex calculated field, because if I only add the hours worked per day, the parts on the basis of which the sum of hours is made appear.
I would be happy to receive help and also resource recommendations to learn more about Power BI and data analytics.
Thank you very much in advance.
Solved! Go to Solution.
Hi @Syndicate_Admin ,
I created a simple sample as below:
Then create a measure as below:
Measure =
IF (
ISINSCOPE ( 'Table'[Subcategory] ),
'Table'[EX],
SUMX ( VALUES ( 'Table'[Subcategory] ), 'Table'[EX] )
)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Hi @Syndicate_Admin ,
I created a simple sample as below:
Then create a measure as below:
Measure =
IF (
ISINSCOPE ( 'Table'[Subcategory] ),
'Table'[EX],
SUMX ( VALUES ( 'Table'[Subcategory] ), 'Table'[EX] )
)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Thanks a lot!
Hi @Syndicate_Admin ,
Glad to help.
If your issue is solved,could you pls mark the reply as answered to let more people find it?
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Please provide sample data in usable format (not as a picture - maybe insert into a table?) and show the expected outcome.
Not very clear what your actual question is. Is the slicer column connected to the rest of the data model?
Yes, it is connected. And the questions are how can I get the sum of overtime per worker? with the clearest possible design and what should I do to get only the work parts corresponding to the date range to appear?
Thank you very much for your interest,
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
79 | |
70 | |
48 | |
41 |
User | Count |
---|---|
139 | |
112 | |
72 | |
64 | |
62 |