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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
shiggs8
Frequent Visitor

Convert LOD Include from Tableau to Power BI

Hi, I am trying to move a report from Tableau to Power BI but I am struggling with one filter based on LOD in Tableau.

Count of SKU: {INCLUDE [Order No] : COUNTD( [SKU]) }

Filter: If [Count of SKU]=1 and [SKU] = "1234" then "0" else "1" END

 

Ideally I wanted to put all of the calculated columns into the source (SQL) as I am using a very large dataset and the refresh can time out when adding a calculated column so was hoping I could do that or use within a measure. 

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @shiggs8 ,

You can try the following form:

Count of SKU: {INCLUDE [Order No] : COUNTD( [SKU]) }:

=
SUMX (
    VALUES ( 'table'[Order No] ),
    CALCULATE ( DISTINCTCOUNT ( 'table'[SKU] ) )
)

Filter: If [Count of SKU]=1 and [SKU] = "1234" then "0" else "1" END

=
VAR Countsku = [Count of SKU]
VAR Sku = [SKU]
RETURN
    IF ( Countsku = 1 && Sku = "1234", 0, 1 )

 

Best Regards,

Liu Yang

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

2 REPLIES 2
Anonymous
Not applicable

Hi  @shiggs8 ,

You can try the following form:

Count of SKU: {INCLUDE [Order No] : COUNTD( [SKU]) }:

=
SUMX (
    VALUES ( 'table'[Order No] ),
    CALCULATE ( DISTINCTCOUNT ( 'table'[SKU] ) )
)

Filter: If [Count of SKU]=1 and [SKU] = "1234" then "0" else "1" END

=
VAR Countsku = [Count of SKU]
VAR Sku = [SKU]
RETURN
    IF ( Countsku = 1 && Sku = "1234", 0, 1 )

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@shiggs8 , I have video on LOD include, see if that can help

 

Tableau Vs Power BI- Chapter 10- LOD Include (Level Of Details): https://youtu.be/nmBVc2fN6aU

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.