Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi everybody,
I have the following challenge.
The following table is available to me for our sales submit.
| Submitted Date | Name | Designation | Region | Status |
| 10/10/2021 | ABC | Jr. Corp Sales | West | Approved |
| 10/10/2021 | CBA | Sr. Corp Sales | East | Rejected |
| 11/2/2021 | GFA | Corp Sales | Central | Approved |
And I want every employee to have a permanent monthly target based on the designation.
| Name | Designation | Target |
| ABC | Jr. Corp Sales | 3 |
| CBA | Sr. Corp Sales | 5 |
| GFA | Corp Sales | 4 |
So I can see the performance of each employee based on the number of approval statuses each month with the remaining or exceeded targets, like this.
| Month | Name | Approved | Target | Score or Variance |
| Jan 21 | ABC | 1 | 3 | -2 |
| Feb 21 | ABC | 4 | 3 | +1 |
I would be happy about your support.
Solved! Go to Solution.
@Anonymous , Join the second Table with first Table and also join first table with date table and have month year column
Target Score=
Sumx(Table1, related(Table2[Target])
Variance = Countrows(Filter(Table1[Status] = "Approved")) - [Target Score]
Hi @Anonymous ,
Create a relationship between two tables by using column [name].
Then create a measure as below:
Measure =
var c_approved = CALCULATE(COUNT(sales[Status]),FILTER(sales,sales[Status]="Approved"))
return
c_approved-SELECTEDVALUE(Target[Target])
Best Regards,
Jay
@Anonymous , Join the second Table with first Table and also join first table with date table and have month year column
Target Score=
Sumx(Table1, related(Table2[Target])
Variance = Countrows(Filter(Table1[Status] = "Approved")) - [Target Score]
Hi, thank you for replying me. But I want to show you, why the variance get the wrong calculation? Can you provide me again? I using Merge Queries as new, from first table to second table with LeftOuter join.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 68 | |
| 31 | |
| 27 | |
| 24 |