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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Slicer/Filter is eliminating data in chart

I'm resurrecting this issue, as my band-aid solution is not adequate. I have a table visualization where I have forecasted future sales. I created a slicer to filter out the data by differing products. When I click on a product, the forecast data (column PROJECTED GRWTH2) disappears. I believe I need to add something to DAX but not sure what that would be. DAX and image below: 

 

PROJECTED GRWTH2 =
VAR vCurYear =
CALCULATE ( YEAR ( MAX ( 'Deep Dive'[Process Date] ) ), ALL('Deep Dive') )
VAR vCurYearSales =
CALCULATE([ACV+YTD Est.DD], ('Calendar Table'[Year] = vCurYear))
VAR vLastYearSales =
CALCULATE ([ACV+YTD Est.DD], 'Calendar Table'[Year] = vCurYear - 1 )
VAR vGrowthRate =
DIVIDE ( vCurYearSales - vLastYearSales, vLastYearSales )
VAR vYearIncrement =
MAX ( 'Calendar Table'[Year] ) - vCurYear
VAR vProjGrowth =
vCurYearSales
* POWER ( 1 + vGrowthRate, vYearIncrement )
VAR vResult =
IF ( MAX ( 'Calendar Table'[Year] ) <= vCurYear, BLANK (), ROUND ( vProjGrowth, 0 ) )
RETURN
vResult
 
cbtekrony_0-1623938521304.png

 

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

 

 

Best Regards
Lucien

DataInsights
Super User
Super User

@Anonymous,

 

Hello again. I figured out a way to allow product filtering. The trick is using a disconnected product table, and adjusting the DAX in measure [ACV+YTD Est.].

 

1. Create a disconnected table (no relationships) that contains a distinct list of all products in the fact table. You can do this in Power Query or DAX. DAX calculated table:

 

Product Slicer = VALUES ( 'PBI Sample Data2'[Product] )

 

2. Measure:

 

ACV+YTD Est. = 
VAR vSelectedProduct =
    TREATAS (
        ALLSELECTED ( 'Product Slicer'[Product] ),
        'PBI Sample Data2'[Product]
    )
VAR vResult =
    CALCULATE (
        SUM ( 'PBI Sample Data2'[Product Value] ) + [Estimated addl ACV],
        vSelectedProduct
    )
RETURN
    vResult

The TREATAS function is necessary to change the data lineage such that the selected product values from the Product Slicer table will be treated as if they are from the fact table, thus filtering the fact table.

 

3. Create product slicer using the calculated table Product Slicer.

 

Original post:

https://community.powerbi.com/t5/Desktop/Forecast-with-DAX/m-p/1588854#M645202 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




v-luwang-msft
Community Support
Community Support

Hi  @Anonymous ,

Could you pls share your pbix file ?Remember to remove confident data.

 

Best Regards

Lucien

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.