Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have multiple measures which needs to be displayed in a table. Of these, 1 measure should remain unaffected by changing year filter and rest all measures should change as per selected year. I tried writing various dax queries but nothing worked.
Below is one of the dax I wrote. But still value changes when year filter is changed.
Closed_count =
var min_date = MINX(ALLSELECTED('Calendar'), 'Calendar'[Date])
var max_date = MAXX(ALLSELECTED('Calendar'), 'Calendar'[Date])
var closed_value = CALCULATE(DISTINCTCOUNT('details'[id]),
ALL('Calendar'),
FILTER('details',
'details'[status] = "closed" &&
'details'[trans_date] >= min_date &&
'details'[trans_date] <= max_date))
Return closed_value
As een in the image attached, count for pending should change with year selection, but count for closed should not change even if year filter is changed.
I tried using all condition as well but no success.
Any help how to achieve this.
Regards,
Amit Darak
Solved! Go to Solution.
Hi @Anonymous ,
Please try this formula.
Closed_count =
VAR min_date = MINX( ALL('Calendar'), 'Calendar'[Date] )
VAR max_date = MAXX( ALL('Calendar'), 'Calendar'[Date] )
VAR closed_value =
CALCULATE(
DISTINCTCOUNT('details'[id]),
FILTER(
ALL('details'),
'details'[status] = "closed" &&
'details'[trans_date] >= min_date &&
'details'[trans_date] <= max_date)
)
Return
closed_value
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try this formula.
Closed_count =
VAR min_date = MINX( ALL('Calendar'), 'Calendar'[Date] )
VAR max_date = MAXX( ALL('Calendar'), 'Calendar'[Date] )
VAR closed_value =
CALCULATE(
DISTINCTCOUNT('details'[id]),
FILTER(
ALL('details'),
'details'[status] = "closed" &&
'details'[trans_date] >= min_date &&
'details'[trans_date] <= max_date)
)
Return
closed_value
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @Anonymous - The ALL condition should negate any selection on the Fiscal Year slicer. Its a silly question but the Fiscal Year slicer is setup from the Calendar table correct?
Also can you share a sample pbix file with the report show in the above screenshot? Thanks!
Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!
Sumanth
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |