Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have made up some data so it is easier for me to explain this.
Name | Count(measure) | Date Before | Date After |
A | 10 | 1/1/2020 | 5/5/2020 |
B | 21 | 1/5/2022 | 5/5/2022 |
C | 25 | 3/4/2019 | 1/1/2020 |
I want to be able to filter the count table between date before and date after. I can put a silcer and get the count value but that would have to be done 1 by 1 and it would not be automatic when new data comes in. The count table is a measure which is what is causing me trouble. If count was not a measure I would be able to use a simple filter function. How would I write a DAX function that would allow me to filter the Values(measure) between the Date Before and Date After?
Solved! Go to Solution.
Hi, @PaulChap
You can try the following methods.
New Table:
Date = CALENDAR(MIN('Table'[Date Before]),MAX('Table'[Date After]))
Measure:
Measure =
CALCULATE (
[Count],
FILTER (
ALL ( 'Table' ),
[Date Before] >= MIN ( 'Date'[Date] )
&& [Date After] <= MAX ( 'Date'[Date] )
&& [Name] = SELECTEDVALUE ( 'Table'[Name] )
)
)
The date slicer selects the relative mode.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @PaulChap
You can try the following methods.
New Table:
Date = CALENDAR(MIN('Table'[Date Before]),MAX('Table'[Date After]))
Measure:
Measure =
CALCULATE (
[Count],
FILTER (
ALL ( 'Table' ),
[Date Before] >= MIN ( 'Date'[Date] )
&& [Date After] <= MAX ( 'Date'[Date] )
&& [Name] = SELECTEDVALUE ( 'Table'[Name] )
)
)
The date slicer selects the relative mode.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@PaulChap , Not very clear, are you getting value from another table.
refer if these can help
Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM
https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...
The information you have provided is not making the problem clear to me. Can you please explain with an example.
Appreciate your Kudos.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |