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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
NickProp28
Post Partisan
Post Partisan

Help Needed: Filtering Data

Hey everyone!

I’ve got a simple question, but it’s really been bugging me. I have two tables: dimData and Calendar, linked by Calendar[date] to dimData[InvoiceDate].

What I need is that when I select (like 'Nov 2023') from my 'Month Year' slicer, the table should only show records where the InvoiceDate is earlier or equal than 'Nov 2023' and the FullyPaidDate is later than 'Nov 2023'.

I’ve tried a bunch of different approaches, but I still can’t get it to work. If anyone could help, I’d really appreciate it!

 

Attached with pbix: https://drive.google.com/file/d/1RkLd58vqie6515hOJOYUe0Hn51qdyj1x/view?usp=sharing

The expectation result should be like this: 

NickProp28_1-1729245190990.png

 

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @NickProp28 

Use a disconnected dates table as using the one related to your fact will filter the records to just that specific month although the total is what's expected.  Please see the attached pbix.

danextian_0-1729248669899.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @NickProp28 

Use a disconnected dates table as using the one related to your fact will filter the records to just that specific month although the total is what's expected.  Please see the attached pbix.

danextian_0-1729248669899.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
_AAndrade
Super User
Super User

Hi @NickProp28,

I disable the relationship and wrote this measure:

Amount Context = 
 VAR _InvoiceDate = ENDOFMONTH('Calendar'[Date])
 VAR _PaidDate = _InvoiceDate + 1
 VAR _TotalMeasure = 
  SUMX(
        FILTER(
            ALL(dimData),
            dimData[InvoiceDate] <=_InvoiceDate && dimData[FullyPaidDate] >=_PaidDate
        ),
        dimData[Sum of InvertedAmount]
  )
    
 VAR _RowMeasure = 
    IF(
        MIN(dimData[InvoiceDate]) <=_InvoiceDate && MIN(dimData[FullyPaidDate]) >=_PaidDate, 
        SUM(dimData[Sum of InvertedAmount]),
        BLANK()
    )
RETURN
    IF(
        ISFILTERED(dimData[Company]),
        _RowMeasure,
        _TotalMeasure
        )

 

The final result was this:

_AAndrade_0-1729248329793.png

I'm attaching a pbix file with my solution.

If you need to have a relationship between calendar tabel and dimData you could create another calendar table and use it to use as filter and use the same measure provided.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.