Forum Discussion

VictorV's avatar
VictorV
Icon for Helper I rankHelper I
2 years ago
Solved

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 

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

  • 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.
     

5 Replies

  • VictorV 

    you can create a column

    Column = if(ISBLANK('Table'[Code]) && ISBLANK('Table'[Amount]) || not(ISBLANK('Table'[Code]))&& not(ISBLANK('Table'[Amount])),TRUE(),FALSE())
    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())
     
     
     
    • VictorV's avatar
      VictorV
      Icon for Helper I rankHelper I

      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.

       

      • ryan_mayu's avatar
        ryan_mayu
        Icon for Super User rankSuper User

        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