Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
RuchiChoudhary
New Member

Exclude row in a table on the basis of Condition

if ContentLogging is present for a resource name then Exclude the row having the value ie. FlagNotSet for the same resource id. If ContentLogging is present for the resourceName and FlagNotSet is not present then ignore. If FlagNotSet is present only for the resourcename then that row should show .

have to filter this row directly in report view - in table

Could you please urgently help in fixing this

 

s3_account_idresource nameCustom
1testContentLogging
1testFlagNotSet
2test1ContentLogging

 

 

3 REPLIES 3
RuchiChoudhary
New Member

Have to filter out this row directly in report view.

I updated the answer, take a look at the second part


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
olgad
Super User
Super User

Hi, if you want to filter those rows out in the visual, then create a Filter column

Filter =
var duplicates=Calculate(COUNTROWS('Tabelle'), ALLEXCEPT('Tabelle', 'Tabelle'[s3_account_id]))
RETURN
If(duplicates=2 && 'Tabelle'[Custom]="FlagNotSet", 0, 1)
and set a page filter or a viz filter to 1 

olgad_0-1683616925576.png


if you want to remove them out of your dataset then

1. Group Rows

olgad_1-1683617181315.png

Expand

olgad_2-1683617200957.pngolgad_3-1683617216702.pngolgad_4-1683617234593.png

And filter for 1.

 

 

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUSpJLS4BUs75eSWpeSU++enpmXnpSrE6KLJuOYnpfvklwaklYBkjqIwhFo2xAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [s3_account_id = _t, #"resource name" = _t, Custom = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"s3_account_id", Int64.Type}, {"resource name", type text}, {"Custom", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"s3_account_id"}, {{"Count", each Table.RowCount(_), Int64.Type}, {"All", each _, type table [s3_account_id=nullable number, resource name=nullable text, Custom=nullable text]}}),
#"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"resource name", "Custom"}, {"resource name", "Custom"}),
#"Added Custom" = Table.AddColumn(#"Expanded All", "Filter", each if [Custom]="FlagNotSet" and [Count]=2 then 0 else 1),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Filter] = 1))
in
#"Filtered Rows"


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.