Forum Discussion

shiggs8's avatar
shiggs8
Frequent Visitor
4 years ago
Solved

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 ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    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.