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.
Hi!
I want to hide the 'Other' row without affecting the percentages of the rest of the rows. I would like to have familiar 43%, currently use 6% and use/have used 7%. Only 3 rows.
I tried by filtering out the 'Other' row but the matrix recalculated all percentages.
Thank you in advance!
Hi @AgusAve ,
Is there any progress on this issue?
If you find any answer is helpful to you, please remember to accept it.
It will help others who meet the similar question in this forum.
Thank you for your understanding.
Hi,
This measure pattern should work
Measure = divide([Value],calculate([Value],all(Data[Category]))]
Value is a measure. If this does not work, then share the download link of the PBI file. Clearly show the problem there.
Create a New Measure for Percentage Calculation: Create a measure that calculates the percentage based on the total, excluding the "Other" category.
PercentageWithoutOther =
VAR TotalWithoutOther =
CALCULATE(
SUM(Sales[SalesAmount]),
ALL(Sales[Category]),
Sales[Category] <> "Other"
)
RETURN
DIVIDE(
SUM(Sales[SalesAmount]),
TotalWithoutOther,
0
)
This measure calculates the percentage of each category, excluding the "Other" category from the total calculation.
Filter the Matrix Visual: Use this measure in the matrix visual. Instead of filtering out the "Other" row, let the visual naturally exclude it by only displaying rows where the Category is not "Other".
Modify the Measure to Display Empty for 'Other': Modify the PercentageWithoutOther measure to return a blank value for the "Other" category.
PercentageWithoutOther =
IF(
SELECTEDVALUE(Sales[Category]) = "Other",
BLANK(),
VAR TotalWithoutOther =
CALCULATE(
SUM(Sales[SalesAmount]),
ALL(Sales[Category]),
Sales[Category] <> "Other"
)
RETURN
DIVIDE(
SUM(Sales[SalesAmount]),
TotalWithoutOther,
0
)
)
Hide Blank Rows: In the matrix visual, go to the Format pane, find the Row Headers section, and enable the Show items with no data toggle. This will hide the "Other" row, as it will now be blank.
hi @AgusAve ,
Maybe consider adding a conditional formatting formula to the font of the matrix.
Measure ConditionalFormatting = if(Table[column] = "Other", "White", "black")
if this doesn't work, kindly share a sample input and expected output in a usable format ( excel, table, etc.) masking sensitive information