Forum Discussion

WestWinter's avatar
WestWinter
Helper II
5 years ago
Solved

HASONEVALUE alternatives?

So I currently have this formula that works well to show a blank value at an aggregate level, while showing up correctly at a row level. However, I noticed that if the aggregate level only has one value (that is the row value), it still shows the row value... Is there an alternative to this, where it shows no values at aggregate level at all?
 

Label =

// Blank at aggregate level
if(HASONEVALUE('Table'[Code]),
LASTNONBLANK('Table'[Code],1),
BLANK()
)

 
  • Hi WestWinter 

    you can try like this,

    turn off Row subtotals

     

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

7 Replies

    • WestWinter's avatar
      WestWinter
      Helper II

      amitchandak This is what I get using my original formula:

       

      As you can see in my matrix, the row with only one value under it will replicate the value in the 2nd column. However, if there are 2 or more values under the row, it will not replicate the value in the 2nd column.

       

      I had tried your formula, but everything is just blanked out in a non-filtered state.

      • amitchandak's avatar
        amitchandak
        Super User

        WestWinter , Not clear with your example. 

         

        Can you share the expected output and data source (some sample data). 

        Seem like you need to check if the below level has only one row. In that can we need create a formula with allexcept  

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Have you tried an expression like this?

     

    Label =

    // Blank at aggregate level
    if(ISINSCOPE('Table'[Code]),
    LASTNONBLANK('Table'[Code],1),
    BLANK()
    )

     

    Pat

     

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi WestWinter 

    you can try like this,

    turn off Row subtotals

     

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.