The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello Everyone,
I hope you're doing well.
I have a quick query regarding a Power BI matrix visualization. I’m trying to create a table with the following setup:
The challenge I'm facing is with adding a “SLA % 3M” measure. When I add it to the matrix, it appears under every month. However, I need this as a standalone column, completely independent of the month/year column slicers.
I’ve already tried using DAX functions like REMOVEFILTER, ALL, and ALLSELECTED, but haven’t had success.
Has anyone implemented something similar or can suggest a solution? I'd really appreciate any help or guidance. Please feel free to ping me if you have any suggestions.
Thank you in advance!
Sample Table
Assignment Group | 2025-04 | 2025-05 | ... | SLA% 3M |
Group A | 0.87 | 0.92 | ... | 0.89 |
Group B | ... | ... | ... | ...
|
Solved! Go to Solution.
Hi Tejas
Ok, great to hear that there is some progress. I took another look to see if I could get rid of the empty columns . I could only find a solution in Power Query and this was the result :
In general the steps taken are as follows : Identifies the Maxmonth and two months before ( Query : MaxMonthQuery ) , which joins with the Grouped average per assignment group ( Query : GroupedAverageQuery ) . This then finally joins with the MaindataQuery ( filtered to show only 3 months prior to max date of the data ) to merge the average SLA% per group.
For the updated file see the same folder I placed the other Power BI files in.
Hope this helps
Antonio
@Lakhani04 Hey,
I will create below measure . I am assume that you these measure SLA met and total case as measure based on that SLA % 3months is getting calculated.
SLA % Last 3 Months =
VAR MaxDateInModel = CALCULATE(MAX('Date'[Date]), ALL('Date'))
VAR StartDate = EDATE(MaxDateInModel, -2) -- last 3 months: includes current month and previous 2 months
// Filter for last 3 months ignoring slicers on Month and Year
VAR Last3MonthsDates =
FILTER(
ALL('Date'),
'Date'[Date] >= StartDate
&& 'Date'[Date] <= MaxDateInModel
)
// Calculate sums within last 3 months, ignoring month/year slicers but respecting row context (grouping)
VAR MetSLA3M =
CALCULATE(
SUM('SLAData'[Met SLA]),
KEEPFILTERS(Last3MonthsDates)
)
VAR TotalCases3M =
CALCULATE(
SUM('SLAData'[Total Cases]),
KEEPFILTERS(Last3MonthsDates)
)
RETURN
DIVIDE(MetSLA3M, TotalCases3M, 0)
Thanks
Harish M
Kindly give kudos and accepts it as solution as if its resolve your problem
No didnt work.
Hi @Lakhani04
I suggest the following :
SLA % 3M =
VAR MaxDate =
CALCULATE(
MAX(Data[Date]),
REMOVEFILTERS(Data)
)
VAR Last3Months =
DATESINPERIOD(
Data[Date],
MaxDate,
-3,
MONTH
)
RETURN
CALCULATE(
AVERAGE(Data[SLA %]),
FILTER(
ALL(Data),
Data[Date] IN Last3Months &&
Data[Assignment Group] = MAX(Data[Assignment Group])
)
)
Result tested with slicer ( table with percentages not affected by slicer - for previous 3 months > as per max date of the data ) :
Below is some further information so that you can adjust the measure if required :
-MaxDate gets the latest date from the entire table, ignoring any filters (like slicers).
-Last3Months creates a list of dates from the last 3 months up to that MaxDate.
-RETURN calculates the average SLA % only for rows in those 3 months and only for the currently selected assignment group.
Hope this helps
Antonio
Tried removefilters no luck.
Hi @Lakhani04
Below is another possible solution without Removefilters :
SLA % Last 3M =
VAR MaxDate =
CALCULATE(
MAX(Data[Date]),
ALL(Data)
)
VAR Last3Months =
DATESINPERIOD(
'Data'[Date],
MaxDate,
-3,
MONTH
)
RETURN
CALCULATE(
AVERAGE('Data'[SLA %]),
Last3Months,
ALLEXCEPT('Data', 'Data'[Assignment Group])
)
with the below result :
Below is my Power BI file if required , feel free to test with a sample of your data.
Power BI Community 25 July 2025
If this amendment does not work , please povide further details ( error message, extra screenshots or a sample file ) .
Antonio
Hello Antonio,
Thanks a lot for sharing this file and helping me.
please have look at the below SS when i add 3 month SAL it apperts for all the month I need it as new column in end.
need to show output like below:
Groups | Jan | Feb | Mar | 3 month SAL |
Group A | 0.87 | 0.92 | 0.89 | 1 |
Group B | 0.91 | 0.88 | 0.93 | 23 |
Group C | 0.95 | 0.9 | 0.85 | 2 |
Group D | 0.86 | 0.94 | 0.87 | 3 |
Thanks for the extra information , below is an amended measure :
SLA % Last 3M (Only Latest Month) =
VAR MaxDate =
CALCULATE(MAX('Data'[Date]), ALL('Data'))
VAR MaxMonth =
EOMONTH(MaxDate, 0)
VAR CurrentMonth =
EOMONTH(MAX('Data'[Date]), 0)
VAR Last3Months =
DATESINPERIOD(
'Data'[Date],
MaxDate,
-3,
MONTH
)
RETURN
IF (
CurrentMonth = MaxMonth,
CALCULATE(
AVERAGE('Data'[SLA %]),
Last3Months,
ALLEXCEPT('Data', 'Data'[Assignment Group])
)
)
The formula finds the latest month in the data and if the context is the latest month it calculates the average SLA % over the last 3 months ( else it remains blank )
The header of this new measure is a bit of challenge. I selected Specific column in formatting options and and changed the text to white so that it does not appear for each month. I then added text below below the table to indicate what the last column shows.
Below is the amended file.
Hope this is closer to what you require
Antonio
Hi Antonio,
Thank you so much for the updated file and the revised DAX. I truly appreciate the workaround you’ve implemented—it's a clever solution!
That said, I’m looking for a more permanent fix where the Matrix table doesn’t generate that empty column at all. If there’s a way to eliminate it entirely at the source, that would be ideal.
Thanks again for your support and great work on this!
Rgards,
Tejas Lakhani
Hi Tejas
Ok, great to hear that there is some progress. I took another look to see if I could get rid of the empty columns . I could only find a solution in Power Query and this was the result :
In general the steps taken are as follows : Identifies the Maxmonth and two months before ( Query : MaxMonthQuery ) , which joins with the Grouped average per assignment group ( Query : GroupedAverageQuery ) . This then finally joins with the MaindataQuery ( filtered to show only 3 months prior to max date of the data ) to merge the average SLA% per group.
For the updated file see the same folder I placed the other Power BI files in.
Hope this helps
Antonio
Thanks a lot Antonio, this solution helps.
To solve this challenge in Power BI Matrix where:
We need to display a static column (SLA% 3M) in the matrix, unaffected by the column grouping (Month-Year), which Power BI matrix doesn’t directly support by default. However, here's how we can solve it with a workaround.
Solution:
The problem arises because you're trying to show a measure independent of the column slicer, but the Power BI matrix groups values based on the column hierarchy.
By creating a custom column header table, and conditionally calculating measures using SELECTEDVALUE, you bypass this behavior and control what appears under each column.
If [SLA % 3M] isn't defined yet, here’s an example of how you can write one:
"SLA % 3M =
CALCULATE(
AVERAGE('YourTable'[SLA %]),
DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -3, MONTH)
)
"
Modify logic based on your business rules.
If this solution works for you, please consider accepting it as the solution and giving it a kudos — it helps others find the answer more easily and supports the community.
I want to help you but your description is too vague. Please write it again.
The example data you provide is too small.
Please provide example input data and the desired output.
You spents more effort saying you tried REMOVEFILTER, ALL, and ALLSELECTED rather than explaining the requirments. 😀😀😀
You will get a quicker and better response without misunderstandings if you put time and effort into carefully writing a clear problem description with example input and output data. Look forward to helping you when this information is forthcoming
* Please DON'T copy & paste your DAX that does not work and expect us to fathom what you want. (That is just crazy). 😀😀😀
* Please DO give a simple non-technical functional description of what you want
* Keep it simple and break large projects into smaller questions and ask just one question per ticket.
* Rename columns to user friendly names. Avoid your own system jargon that we may not understand.
* Most importantly please provide example input data as table text (not a screen print) so helpers can import the data to build a solution for you. (Learn how to share data below)
* Provide the example desired output, with a clear step-by-step description of calculations and the process flow.
* Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.
* Remove any unneeded tables, rows or columns which may cause confusion. Keep it short and concise with the minimal information regarding the key problem.
* Remember not to share private data ... we don't want you to get into trouble.
* Please click the thumbs up button for these helpful hints and tips. Thank you.
Learn how to attach data in the forum using OneDrive:-
* Save your file in a OneDrive folder
* Right click on the file and click the “Share” blue cloud icon
* Click the bottom “Copy” button
* Click” Anyone with link can edit”
* Click “Can Edit”
* Click “Can View”
* Click “Apply” button
* Click “Copy”
* Paste the generated link via the forum, email, chat, or any other method.
* Helpers can then download your data, build a solution and share it back.
Learn how to attach data in the forum using Dropbox:-
1. Open Dropbox: Access the Dropbox folder on your computer or through the Dropbox web interface.
2. Select File/Folder: Find the file or folder you want to share.
3. Click Share (or Get Link): Look for a "Share" option or a similar "Get Link" option.
4. Choose Permissions: Decide whether to allow "view only" or "view and download" access.
5. Copy and Share: Copy the generated link and share it with anyone via the forum, email, chat, or any other method.