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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PowerBI_M
Regular Visitor

Create a PowerBI measure, to perform some filter tasks.

Hi,

 

I want to create a PowerBI measure, to perform some filter tasks.

Basically, I want to create a measure that returns 1 if ColumnA = empty OR column B is empty OR columns C = empty. I'm just getting started with measures and I am getting stuck.

My code attempt:

M_DataIssues = FILTER(
                      ALL(Table[ColA] ; Table[ColB] ; Table[ColC])
                          Table[ColA] = "" || Table[ColB]= "" || Table[ColC] = "")

Any help would be appreciated.

PS. due to my user permissions, I can only create measures. I do not have rights to do other modelling tasks or create columns e.g.

Thanks!!

KR ~M.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Well, if you want a measure, it would be something like:

 

M_Flag = 
  IF(
    'Table'[ColA]="" || 'Table'[ColB]="" || 'Table[ColC]="",
    TRUE,
    FALSE
  )

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

Well, if you want a measure, it would be something like:

 

M_Flag = 
  IF(
    'Table'[ColA]="" || 'Table'[ColB]="" || 'Table[ColC]="",
    TRUE,
    FALSE
  )

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks, I accepted the solution. Is there a way to filter on this created measure? So only the True values? Again, I can only create measures, no columns etc.

 

ty

 

~M

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors