March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have got a simple table of student attendance (around 50 rows) looking as follows:
CourseGroup | CourseCode | Period 1 - Actual | Period 1 - Target | Period B - Actual | Period B - Target | Period C - Actual | Period C - Terget |
A | Z0001 | 25 | 50 | 34 | 58 | 43 | 58 |
B | Z0002 | 15 | 20 | 35 | 40 | 33 | 50 |
A | Z0003 | 12 | 23 | 15 | 25 | 16 | 22 |
B | Z0004 | 30 | 40 | 35 | 45 | 33 | 50 |
I've created a measure for each period to calculate the percentage of achieving the target:
Solved! Go to Solution.
@Anonymous
I think there's a fundamental thing you have to do with your data modeling first. Unpivot your data into similar fashion:
Next, you need to create generic measures:
TotalValue = SUM(School[Value])
Actuals = CALCULATE([TotalValue], School[Attribute] = "Actual")
Targets = CALCULATE([TotalValue], School[Attribute] = "Target")
Delta = DIVIDE([Actuals], [Targets])
And you should be able to achieve your desired results:
If this is not the answer you were looking for please let me know.
@Anonymous
I think there's a fundamental thing you have to do with your data modeling first. Unpivot your data into similar fashion:
Next, you need to create generic measures:
TotalValue = SUM(School[Value])
Actuals = CALCULATE([TotalValue], School[Attribute] = "Actual")
Targets = CALCULATE([TotalValue], School[Attribute] = "Target")
Delta = DIVIDE([Actuals], [Targets])
And you should be able to achieve your desired results:
If this is not the answer you were looking for please let me know.
Thank you. I've reorganised the data as you suggested. I'll play with it now.
Hi @Anonymous ,
Have your problem be solved? Please consider accept the answer as a solution if it worked.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |