Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Calculation from Spotfire to Power BI

Hi All,

I have calculation in the spotfire mentioning below.I have two columns Start date and End Date and need to filter based on the condition.

Transformation - Filtered Rows

[Start Date]>= [End Date]

I need to convert this calculation in Power BI Query Editor.

Please help.

 

Thanks.

 

 

 

 

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

1. Add a custom column:

Vlianlmsft_0-1646017441083.png

2. Filter on TRUE.

3. Remove the custom column.

Vlianlmsft_1-1646017487405.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("TYxLDoAwCAXvwrokBUXrWUgX9Xf/IwgaIrvJm8lThQEFuDIhoQQyNuhFYY9hwjVwsczdEYPgFjhb5u78BrZPkmC2zuX1D1RT+Mo7yZYkQ+8P", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Task = _t, Start = _t, End = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Task", type text}, {"Start", type date}, {"End", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [Start]>=[End]),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Custom] = true)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Custom"})
in
    #"Removed Columns"


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

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

1. Add a custom column:

Vlianlmsft_0-1646017441083.png

2. Filter on TRUE.

3. Remove the custom column.

Vlianlmsft_1-1646017487405.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("TYxLDoAwCAXvwrokBUXrWUgX9Xf/IwgaIrvJm8lThQEFuDIhoQQyNuhFYY9hwjVwsczdEYPgFjhb5u78BrZPkmC2zuX1D1RT+Mo7yZYkQ+8P", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Task = _t, Start = _t, End = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Task", type text}, {"Start", type date}, {"End", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [Start]>=[End]),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Custom] = true)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Custom"})
in
    #"Removed Columns"


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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.