Forum Discussion

akhaliq7's avatar
akhaliq7
Post Prodigy
4 years ago
Solved

Using getpivotdata equivalent in Power BI

I have this formula in excel and I need to use the equivalent in Power BI using DAX: 

=GETPIVOTDATA("Count of Sales Year",$A$3,"Product Available Date",2022,"Product","bikes")

+ GETPIVOTDATA("Count of Sales Year",$A$3,"Product Available Date",2022,"Product","toys") 

+ GETPIVOTDATA("Count of Sales Year",$A$3,"Product Available Date",2022,"Product","clothes")

 

  • Count of Sales Year =
    COUNTX(FILTER(SALES, SALES[Product Available Date] = "2022" && SALES[Product] = "Bike"),
    [Sales Year]
    )
    + COUNTX(FILTER(SALES, SALES[Product Available Date] = "2022" && SALES[Product] = "Toys"),
    [Sales Year]
    )
    + COUNTX(FILTER(SALES, SALES[Product Available Date] = "2022" && SALES[Product] = "Clothes"),
    [Sales Year]
    )

1 Reply

  • Count of Sales Year =
    COUNTX(FILTER(SALES, SALES[Product Available Date] = "2022" && SALES[Product] = "Bike"),
    [Sales Year]
    )
    + COUNTX(FILTER(SALES, SALES[Product Available Date] = "2022" && SALES[Product] = "Toys"),
    [Sales Year]
    )
    + COUNTX(FILTER(SALES, SALES[Product Available Date] = "2022" && SALES[Product] = "Clothes"),
    [Sales Year]
    )