Reply
avatar user
Anonymous
Not applicable
Partially syndicated - Outbound

Show data with start date on or after selected date

Hello,
I'm posting this again since i have not solved the issue yet, and it is urgent. 

I am trying to create a matrix that shows service contract fees for each month, based on the date selection in a slicer. 

My data is created in the folowing way:

Contract                           contract start date                               contract end day                                   All dates                                   Monthly fee                             
1A01-01-202101-03-202101-01-2021100
1A01-01-202101-03-202101-02-2021100
1A01-01-202101-03-202101-03-2021100
2B01-06-202101-07-202101-06-2021200
2B01-06-202101-07-202101-07-2021200

Each contract has a start day, an end day, and a line for each month inbetween (including the start and end month) called All dates. 

My slicer consists of fiscal years and quarters, so i can't use the "is after" slicer function. The fiscal date table i related to the column "All dates". 

skanord_0-1656406886278.png

 

 

The problem:

I want my visual to show the fees for each month, but if the start date is not in, or after, the date in the slicer selection, i do not want to see the fees related to that contract. 

This is what i have so far, but it is still not working:

Someone suggested the folowing: "Create a measure that acts as a visibility flag and then add that measure to the visual level filters."
So i have tried to do that with the folowing measures, but no luck. 

min_startdate = calculate(MIN('Service Contr Lines (2)'[Starting_Date]))

min_fiscal_date = CALCULATE(MIN('Fiscal.Date'[Date]))

expected_MoM_filter = IF(Measures_[min_startdate]>=Measures_[min_fiscal_date],1,0)
skanord_0-1656407000036.png

 

 

(The fiscal date table has a relationship with the 'All dates' column in the data)

2 REPLIES 2
amitchandak
Super User
Super User

avatar user
Anonymous
Not applicable

Syndicated - Outbound

Thank you for your reply, i have looked through your solutions, but i get the same issue as i do in my own model. 

skanord_1-1656576480837.png    skanord_0-1656576438627.png

(The screen shot is from the model in this post https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o... but i had the same problem when i tried the other models.) 

When i filter the data i still see data for contracts with start dates before the selected date. In the image both id 1 and 4 has a start day in march, but they still show up when i select april. 

What I am trying to achive is: Only show contracts and their data with start dates on or after the selected date. 

I hope this makes sense, but please let me know if I need to elaborate further. 

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)