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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Dynamically change date range for Each row of table based on another field

Hello,

 

I am having an issue where i want to dynamically apply a date filter to each row in a table based on which row it's in (Client Name or ClientID). 

 

Is there a dax measure i could write using SWITCH or IF that would detirmine the date range for the value being shown dynamically based on each client its related to.

 

I have a field named 'Sub Rollover' (Subscription Rollover) which is a date field i want to base the dates off. The table shown below is actually 3 tables, the month column being its own table (Sub Rollover) and the 'Used Samples to date' & 'Remaining Tests' are another separate table from the main table. "Used Samples to Date' is the field I want to dynamically filter based on the 'Sub Rollover' ('Month' in this visual).

 

Screenshot 2022-10-14 135601.png

 The table the data comes from is called "FarmSubmissionCount"

 

Here is the link to Pbix file:

https://techiongrouplimited-my.sharepoint.com/:u:/g/personal/ben_techiongroup_co_nz/EeaS5yFPtltHiLu9...

 

The page of the report above is "Duplicate of Client Stats"

 

Any help is apprecaited, 

 

Thanks.

1 REPLY 1
lbendlin
Super User
Super User

Thank you for providing the sample data. That usually helps a lot with proposing a potential solution.

In your case the sample data is too detailed. It is not clear (to me) what the expected outcome is from this.

 

Please provide sample data that fully covers your issue (but not more).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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