I cannot figure out why my table in the report view is not filtering all blank values of Year-over-year (YoY) Profit of products ranked greater than 3.
Below is my code to filter top 3products ranked by largest YoY Profit growth:
Top3_YoY_Product_Profit = CALCULATE([YOY_GP$], FILTER(VALUES('Dim-Product'[Brand]), IF(RANKX(ALL('Dim-Product'[Brand]),[YOY_GP$],,DESC) <= 3, [YOY_GP$], BLANK())))
The output filters the Top 3 but also shows $0 for products ranked more than 3. I don’t want it to show those products in the report view. Is there a way to do this in dax without the use of a visual filter?
My Dim-Product table is connect to my FactSales table via the column name “Item #”. Maybe because I’m filtering by “Brand” and not “Item#” it’s causing this issue