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.
I have a matrix table set up with IF statements to identify suppression rules. What I need is both columns to be suppressed when column A is supressed. Below is screenshot of what I have vs what I need.
Any ideas?
What I have | ||
Data Column A | For | Against |
A | 97 | 1,750 |
B | 385 | 32,203 |
C | ** | 1,234 |
D | 45 | 87 |
E | ** | 7,024 |
What I need | ||
Data Column A | For | Against |
A | 97 | 1,750 |
B | 385 | 32,203 |
C | ** | ** |
D | 45 | 87 |
E | ** | ** |
Thanks!
Solved! Go to Solution.
Hi @Marvhall ,
Please have a try.
Create a meausre.
Measure = IF(MAX('Table'[For])="**","**",MAX('Table'[Against]))
Or a column.
Column =
VAR _1 =
CONVERT ( 'Table'[Against], STRING )
RETURN
IF ( 'Table'[For] = "**", "**", _1 )
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUbI0BxKGOuamBkqxOtFKTkCesYUpiDTSMTIwBgs6A7laWmB1RsYmYCEXIM8EpMzCHMx3hSkx1zEwAiqJBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Data Column A" = _t, For = _t, Against = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,each [Against],each if [For]="**" then [For] else [Against],Replacer.ReplaceValue,{"Against"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Against", type text}})
in
#"Changed Type"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUbI0BxKGOuamBkqxOtFKTkCesYUpiDTSMTIwBgs6A7laWmB1RsYmYCEXIM8EpMzCHMx3hSkx1zEwAiqJBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Data Column A" = _t, For = _t, Against = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,each [Against],each if [For]="**" then [For] else [Against],Replacer.ReplaceValue,{"Against"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Against", type text}})
in
#"Changed Type"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".
Hi @Marvhall ,
Please have a try.
Create a meausre.
Measure = IF(MAX('Table'[For])="**","**",MAX('Table'[Against]))
Or a column.
Column =
VAR _1 =
CONVERT ( 'Table'[Against], STRING )
RETURN
IF ( 'Table'[For] = "**", "**", _1 )
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
This works when the values are in their own column. See below for column make up.
What I am doing to get your solution is to reference the main table and select these columns, unvpivot Group A, then Pivot on Group A to get them into their own column headings.
Thoughts? or do you have a better solution?
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 |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
9 |