Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Annual reported Salaries vs Monthly reported Bonuses

Hello,

1. Salaries are reported annually. However, they can change each month.


2. Bonuses are paid irregularly over different months.


I am trying to achieve:
Show in the table "Yearly Salary Vs Bonus" the correct results for Salary and Bonus while selecting a specific Month. OR if Selecting a YEAR from the year slicer, I would like the Salary of DEC of that year.
Please see link for the file.
https://basintamir-my.sharepoint.com/:u:/g/personal/tamir_tamirbasin_com/EbeTLvJsTwJGpYaV4f-6m44BbHN...

Thank you

Tamir

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

You could create a measure below to meet your requirement.

 

Annual_Salary =
IF (
    ISFILTERED ( dimCalendar[MonthYear] ),
    MAX ( 'factsSallaries'[Annual Salary] ),
    CALCULATE (
        SUM ( factsSallaries[Annual Salary] ),
        FILTER (
            'factsSallaries',
            'factsSallaries'[Date] = ENDOFYEAR ( 'factsSallaries'[Date] )
        )
    )
)

The picture of result is below.

Picture_1 --no filter

Capture.PNG

 

Picture _2--by selecting the specific month

 

Capture1.PNG

 

 

Additionally, you could refer to the PBIX file here.

 

Hope it can help you!

 

Best regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.