Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext 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
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!
Solved! Go to Solution.
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.
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.
@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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 44 | |
| 40 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 69 | |
| 32 | |
| 32 | |
| 32 |