Forum Discussion

bjurek's avatar
bjurek
Helper I
3 years ago
Solved

HASONEVALUE problem

in the Power BI Dekstop program, I have 4 columns that I place in the matrix visualization.
I put Year column, Month column and Day column in rows and Value column in values.
Would like to not show the sum of the values ​​for the IValue column when the columns are collapsed. Unfortunately, after collapsing the columns, the sums for the columns appear and I don't want that. I have used the HASONEVALUEe function as below but the sum still appears.

IF(HASONEVALUE(Table_Name[Year]), Table_Name[Value], BLANK())


 

 

 

 

  • I have exactly the same but Year, Month and Day are text type:

     

     

12 Replies

  • mlsx4's avatar
    mlsx4
    Memorable Member

    Hi bjurek 

     

    You can use ISINSCOPE

     

     

    sumSc = SWITCH(
        TRUE(),
        ISINSCOPE('Table'[Day]),SUM('Table'[IndeksVisible]),
        BLANK()
    )