Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi guys,
I have to create Year-to-date measure to recieve the bonus of every emloyee
Let me explain in the example.
This is my table and I want to get summurized information about year-to-date bonuses
So in the end I want to recieve this:
Solved! Go to Solution.
HI @GeorgiBarov
Please try this...revision
YTD Bonus = CALCULATE ( SUM ( Table1[Bonus] ), FILTER ( ALLEXCEPT ( Table1, Table1[Employee] ), Table1[Bonus Date] <= SELECTEDVALUE ( Table1[Bonus Date] ) ) )
HI @GeorgiBarov
Try this MEASURE
YTD Bonus = CALCULATE ( SUM ( Table1[Bonus] ), FILTER ( ALL ( Table1[Bonus Date] ), Table1[Bonus Date] <= SELECTEDVALUE ( Table1[Bonus Date] ) ) )
Hi @Zubair_Muhammad and thank you for the reply 🙂
I tried it and it works with the simple example which I gave, but when I tried it to use it in more complex dataset I recieved this:
And here is the data set and formula:
Have you got any suggestions why this happened?
Thank you in advance 🙂
HI @GeorgiBarov
Please try this...revision
YTD Bonus = CALCULATE ( SUM ( Table1[Bonus] ), FILTER ( ALLEXCEPT ( Table1, Table1[Employee] ), Table1[Bonus Date] <= SELECTEDVALUE ( Table1[Bonus Date] ) ) )
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |