Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I'm trying to create a filter to determine the inclusion or exclusion of records in a dimension table based on whether the Threshold Date for each record is less than the calculated Last Date measure. There's probably a much more intelligent way to do this, but I'm kind of stumbling my way around here and am not very good with DAX.
The threshold date column is native to the imported Excel spreadsheet that I'm using as a dimension table; the measure is based on a calendar dimension table imported from a data warehouse, and I'm selecting date ranges using a date slicer in the report. I've tried calculating the Last Date two different ways:
Solved! Go to Solution.
@arc_gts you can write this two measures
_isThresholdLesserThanLastSelected = if(MAX(Category[Threshold Date])<=[Category last date],0,1)
_isThresholdGTThanLastSelected = if(MAX(Category[Threshold Date])>[Category last date],0,1)
@arc_gts you can write this two measures
_isThresholdLesserThanLastSelected = if(MAX(Category[Threshold Date])<=[Category last date],0,1)
_isThresholdGTThanLastSelected = if(MAX(Category[Threshold Date])>[Category last date],0,1)
Goal: add an indicator that I can use as a filter to show or hide rows in a table based on a date in the table vs. a date in a slicer (no direct relationship between date slicer table and dimension table)
Expected outcome: rows in the dimension table with a greater date than the maximum selected slicer date value should have a value of zero, while rows in the dimension table with a value less than / equal to the maximum selected slicer date value should have a value of 1
Actual outcome: rows in the dimension table that have date value that exists in the calendar table have a value of 1, ignoring the selected range in the slicer; rows in the dimension table that have a date value that doesn't exist in the calendar table (greater than the max date value) have a value of zero
Please see below. It looks like I'm unable to upload a PBIX file.
Thanks.
You cant upload PBIX to the forum.
You need to save it on Onedrop or Dropbox with public view access and then share the link on the forum.
@arc_gts provide sample data and expected output
Hi
Sorry I dont understand you.
May I suggest rather than you try explain you rsolution (which does not work and you want us to fix).
That you simply explain the problem more clearly and with an exmaple, then I am sure we can all help you with this date filter issue.
Thanks
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |