Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Everyone,
I have a matrix visual with MTD and YTD values for expenses with location and account lines. I need MTD to be filtered and i want YTD to remain static, to filter the MTD value i have used a parameter and used slicer from it. How can i limit YTD value to not get affected from the slicer. I also have a relation from table A with the parameter table. The measure for YTD value is as below:
YTD =
VAR n = [EXPENSES]
VAR d = year(today())
RETURN
CALCULATE(
n,
ALLEXCEPT('Table A', 'Table A'[Date].[Year]),
'Table A'[Date].[Year] = d
)
Measure for MTD:
MTD-PARAM =
CALCULATE(
[EXPENSES],
'Table A'[Month NO] = SELECTEDVALUE('Parameter Table'[Month NO]) &&
YEAR('Table A'[Date]) = YEAR(TODAY())
)
Thanks For the help.
Solved! Go to Solution.
Hi @Rabi
Try this:
YTD =
VAR CurrentYear = YEAR(TODAY())
RETURN
CALCULATE(
[EXPENSES],
REMOVEFILTERS ( 'Parameter Table' ),
YEAR('Table A'[Date]) = CurrentYear
)
Or
YTD =
VAR CurrentYear = YEAR(TODAY())
RETURN
CALCULATE(
[EXPENSES],
FILTER(
ALL('Table A'),
YEAR('Table A'[Date]) = CurrentYear
)
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn | Twitter | Blog | YouTube
Hi @Rabi
Try this:
YTD =
VAR CurrentYear = YEAR(TODAY())
RETURN
CALCULATE(
[EXPENSES],
REMOVEFILTERS ( 'Parameter Table' ),
YEAR('Table A'[Date]) = CurrentYear
)
Or
YTD =
VAR CurrentYear = YEAR(TODAY())
RETURN
CALCULATE(
[EXPENSES],
FILTER(
ALL('Table A'),
YEAR('Table A'[Date]) = CurrentYear
)
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn | Twitter | Blog | YouTube
Hi @VahidDM ,
The first dax worked perfect as the idea was to remove filter from the parameter slicer. Thanks very much, Absolute legend.
Glad it fixed.
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 |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |