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
VictorV
Helper I
Helper I

Create condition measure for column show in Report View

Hi everyone,

 

Currently, on my Report View, I have a table like below.

I want to create a measure, that  I will use as a filter TRUE/FALSE.

 

The condition will be like:

condition 1: If [Code] is {blank} and [Amount] is {blank} then it will TRUE

condition 2: If [Code] have value and [Amount] have value then it TRUE

condition 3: If [Code] have value and [Amount] is {blank} then it FALSE 

VictorV_0-1713311927777.png

Please help me!!!!!!!!!! Thanks everyone

5 REPLIES 5
ryan_mayu
Super User
Super User

@VictorV 

you can create a column

Column = if(ISBLANK('Table'[Code]) && ISBLANK('Table'[Amount]) || not(ISBLANK('Table'[Code]))&& not(ISBLANK('Table'[Amount])),TRUE(),FALSE())
11.PNG
or a measure
 
Measure = if(ISBLANK(sum('Table'[Amount]))&&ISBLANK(sum('Table'[Code])) ||not(ISBLANK(sum('Table'[Code])))&&not(ISBLANK(sum('Table'[Amount]))),TRUE(),FALSE())
 
12.PNG
 
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi, thanks for your replied.

 

But in my case [Amount] is a measure, and [Code] is a text. Also, it's not on the same  table. The table I show you is from the Report View, it come from 2 table. So, my problem here that how I can create measure with those condition for the table in Report View like that.

 

i think you can do something like below, pls have a try

 

Measure 2 = if(ISBLANK(max('Table'[Code]))&&ISBLANK([Measure])||not(ISBLANK(max('Table'[Code])))&&not(ISBLANK([Measure])),TRUE(),FALSE())
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Can it put it to filter like this a filter only True

VictorV_0-1713318568983.png

 

i changed true false to 1 and 0

 

Measure 2 = if(ISBLANK(max('Table'[Code]))&&ISBLANK([Measure])||not(ISBLANK(max('Table'[Code])))&&not(ISBLANK([Measure])),1,0)
 
it works on my end, you can have a try.
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.