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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.