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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Filter as of month keeping Open values and excluding paid values

Hi all,

 

I have the table below and I need to have a slicer "as of month" that when I filter Apr-2021 I need to show the value for Mar-2021 only where the Open Amount still open. 

 

I also have a date table in my model.

 

In the case below when filtered Apr-2021 also shows invoice b as it is still open but doesn't show invoice a which is already paid.

 

InvoiceDue dateAmountPaidOpen Amount
aMar-21200020000
bMar-2115000-1500
cApr-2110000-1000
dApr-2132000-3200

 

Is that possible?

 

Many thanks

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link down below.

I suggest having a separate slicer table, like below, in order to make the visualization act differently than what readers select in the slicer.

The measure is in the sample pbix file.

 

Picture4.png

 

Open Amout Show =
VAR currentmonth =
MONTH ( SELECTEDVALUE ( Slicer[Due date - Copy], TODAY () ) )
VAR previousmonthamountnotclose =
CALCULATE (
SUMX ( Invoices, Invoices[Paid] - Invoices[Amount] ),
KEEPFILTERS (
FILTER (
ALLSELECTED ( Invoices ),
MONTH ( Invoices[Due date - Copy] ) = currentmonth - 1
)
)
)
RETURN
IF ( previousmonthamountnotclose <> 0, previousmonthamountnotclose, BLANK () )
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

@Jihwan_Kim Hi, thanks for your input.

 

I also need to keep showing the values for apr-2021

Hi, @Anonymous 

Thank you for your feedback.

I thought only showing the previous month's information.

 

Please change the = sign to >= , like below.

 

Open Amout Show =
VAR currentmonth =
MONTH ( SELECTEDVALUE ( Slicer[Due date - Copy], TODAY () ) )
VAR previousmonthamountnotclose =
CALCULATE (
SUMX ( Invoices, Invoices[Paid] - Invoices[Amount] ),
KEEPFILTERS (
FILTER (
ALLSELECTED ( Invoices ),
MONTH ( Invoices[Due date - Copy] ) >= currentmonth - 1
)
)
)
RETURN
IF ( previousmonthamountnotclose <> 0, previousmonthamountnotclose, BLANK () )
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

That almost got the result I need.

 

The only issue having a disconnected table is because i also need to filter the march back if i need to

amitchandak
Super User
Super User

@Anonymous , Try a measure like

measure =
var _max = maxx(allselected('Date'), 'Date'[Date])
return
calculate(countx(filter(values(Table[Invoice]), calculate(sum(table[Amout]) -sum(Table[Paid])) =0), [Invoice]),filter(Table, Table[due Date] <=_max))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors