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 there!
I´m trying to get this calculation done:
Tons/Number of FTE
I have these tables:
Table1: Tons
Line|Month|Tons
Table2: Base
ID number|Month worked
What I need is to graph by month, the sum of al the tons produced divided by the total of FTE that worked in each month.
I came up with this measure:
Solved! Go to Solution.
hi @Anonymous
Try this way as below:
Step1:
Create a dim date table:
https://radacad.com/do-you-need-a-date-dimension
Step2:
Create the relationship as below:
Step3:
Create a measure
Tn/FTE = DIVIDE( SUM(Tons[Tons]), DISTINCTCOUNT(Base[ID Number]))
Result:
Regards,
Lin
hi @Anonymous
Try this way as below:
Step1:
Create a dim date table:
https://radacad.com/do-you-need-a-date-dimension
Step2:
Create the relationship as below:
Step3:
Create a measure
Tn/FTE = DIVIDE( SUM(Tons[Tons]), DISTINCTCOUNT(Base[ID Number]))
Result:
Regards,
Lin
hi @Anonymous
You need to use ALL Function in your measure
If not your case, please share your sample data and your expected output.
Regards,
Lin
Thanks! I have these tables:
Thanks in advance!
Table1: "Tons" | ||
Production Line | Month | Tons |
Line 1 | Jan-20 | 29 |
Line 2 | Jan-20 | 15 |
Line 3 | Jan-20 | 25 |
Line 1 | feb-20 | 28 |
Line 2 | feb-20 | 30 |
Line 3 | feb-20 | 13 |
Line 1 | mar-20 | 14 |
Line 2 | mar-20 | 10 |
Line 3 | mar-20 | 19 |
Table2: "Base" | |
ID Number | Month |
4667 | Jan-20 |
4667 | feb-20 |
4667 | mar-20 |
4843 | feb-20 |
4843 | mar-20 |
8616 | Jan-20 |
8616 | feb-20 |
2224 | feb-20 |
4360 | Jan-20 |
4360 | feb-20 |
4360 | mar-20 |
1312 | Jan-20 |
1312 | mar-20 |
1527 | Jan-20 |
1527 | feb-20 |
1527 | mar-20 |
3288 | Jan-20 |
3288 | feb-20 |
3288 | mar-20 |
3706 | feb-20 |
3094 | mar-20 |
3094 | feb-20 |
3094 | mar-20 |
Total Tons | Total People | Expected Output | ||
Jan-20 | 69 | 6 | 11,5 | = 69/6 |
feb-20 | 71 | 9 | 7,9 | = 71/9 |
mar-20 | 43 | 8 | 5,4 | = 43/8 |
@Anonymous As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.
https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-calculations/
Connect this table with both of your tables and then use column from this table in your visual and everything will work as expected.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |