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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

DAX Measure based on selected filter value

Hi Everyone!

Just an FYI - I’m very new at using DAX.

 

I’m wanting to build a WIP report for Month end to calculate unrecognised revenue. I’m wanting to create a measure and link a date filter which’ll calculate the unrecognised revenue value as per the selected filter date. The aim is for users to select their desired date.

 

The formula I’d like to achieve:

SUM([Revenue]) WHERE [P&L date] > “[Selected Filtered Date]” + SUM([Revenue]) WHERE [P&L Date] IS NULL.

With the above grouped by Reporting Month.

 

Format of my data:

Reporting MonthP&L DateRevenue
31/01/202331/01/2023100
31/01/202328/02/2023100
31/01/2023NULL150
31/01/202331/03/2023100
28/02/202328/02/2023200
28/02/2023NULL100
28/02/202330/04/2023250
31/03/202331/03/2023150
31/03/202330/04/2023300
31/03/2023NULL100

 

So by having a filter select the date “28/02/23” the measure will calculate the unrecognised revenue as £250 for Reporting Month “31/01/23”

 

Any help/suggestions would be greatly appreciated.

Happy to give more detail if needed

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

 

Here are the steps you can follow:

1. Create measure.

Measure =
var _select=SELECTEDVALUE('Table'[Reporting Month])
return
SUMX(
    FILTER(ALL('Table'),
    'Table'[Reporting Month]<>_select&&'Table'[P&L Date]=BLANK()),[Revenue])

2. Result:

vyangliumsft_0-1681876704149.png

 

Best Regards,

Liu Yang

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @Anonymous ,

 

Here are the steps you can follow:

1. Create measure.

Measure =
var _select=SELECTEDVALUE('Table'[Reporting Month])
return
SUMX(
    FILTER(ALL('Table'),
    'Table'[Reporting Month]<>_select&&'Table'[P&L Date]=BLANK()),[Revenue])

2. Result:

vyangliumsft_0-1681876704149.png

 

Best Regards,

Liu Yang

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

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.