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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
lucky_jyoti
Regular Visitor

Need help creating a measure to display Bonus Sales for the last financial year

Hi, 

I am having trouble "thinking in DAX" WRT below proportion.

Trying to create a measure to calculate 'Bonus values'  for last financial year (Jan-Dec) ,to be paid in the month of FEB every year. There are actual values coming from 'Smartsheet' and forecast vaalues coming from 'Snowflake'. It should display in the report as one value only under 'FEB'. The functionality being expected is like one below. Display values only under FEB and other month remain blank for that measure.

 

lucky_jyoti_0-1685810755413.png

 The tables used from the model are: 

lucky_jyoti_2-1685811220743.png

 

lucky_jyoti_1-1685811116895.png

The base Bonus sales values will be based on the below measure:

Bonus Expense =
VAR closing_date =
    DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
VAR date_context =
    DATE ( SELECTEDVALUE ( 'Date'[Year] ), SELECTEDVALUE ('Date'[Month] ), 1 )
VAR result =
    CALCULATE (
        SUM ( 'Actual and Planning Details'[Amount_orig] ),
        'Actual and Planning Details'[Version]
            = IF (
                date_context >= closing_date,
                SELECTEDVALUE ( 'VA - Compare Selections'[Version (Compare)] ),
                "Actuals"
            )
       
    )
  RETURN
    result

 

2 REPLIES 2
Anonymous
Not applicable

Hi @lucky_jyoti ,

 

(1)We can create two columns.

 

Month number= Month('Calendar'[Date])
Financial Year= YEAR('Calendar'[Date])

 

(2)We can create a measure.

 

Bonus Values = 
var _a= CALCULATE ( SUM ( 'Actual and Planning Details'[Bonus Expense] ), FILTER ( ALL('Calendar'), 'Calendar'[Financial Year] = MAX('Calendar'[Financial Year]) - 1 ))
return 
IF( MAX('Calendar'[Month Number] )= 2 ,_a,BLANK())

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

 

 

Thank you Neeko for your reply and coming up this solution. 

Here is how we put it to work: 

IF(
      ISINSCOPE('Date'[Month Name]) && SELECTEDVALUE('Date'[Month Name]) = "February" ,
      CALCULATE(([Bonus Expense]), ALLEXCEPT('Date', 'Date'[Year]), PREVIOUSYEAR('Date'[Posting Date]))
  )

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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