Forum Discussion

markus_zhang's avatar
markus_zhang
Advocate III
7 years ago
Solved

How to filter out blank rows from a column

Hi experts,

I'm trying to use a calculate column to get the percentile based on another column that has blank values, Power BI complains that "Expressions that yield variant data-type cannot be used to define calculated columns", which I assume has something to do with the blank values.

 

So far I haven't been able to achieve this, and AFAIK ALLNOBLANKROW() seems to be close but it actually consumes a table and produces another table. Also I cannot wrap PERCENTILE.EXC with a CALCULATE because I'll lose row context.

 

Code:

Login_total = 
    PERCENTILE.EXC(
        Email[Login_count],
        Percentile[Percentile] / 100
    )
  • Solved.

    I stumbled on another post and solved the issue by changing the format of the source column to decimal instead of integer. Apparently this has nothing to do blank values, as my other percentile calculated columns also consume balnk values and they are fine.

1 Reply

  • Solved.

    I stumbled on another post and solved the issue by changing the format of the source column to decimal instead of integer. Apparently this has nothing to do blank values, as my other percentile calculated columns also consume balnk values and they are fine.