Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello, PowerBI Gurus,
So I have a simple measure that computes a forecast for the selected period. When I use a card visualization and apply a filter to it it works just fine. However, if I need to use the measure in other calculations, then the filter which I applied to the card gets lost.
My question is: How do I incorporate the filter directly into the measure? (I need a filter that filters out just the chosen year)
Here is my measure:
Forecast 2019 = CALCULATE(SUM(MANAGERS[Plan 2019])/12, ALL())*DISTINCTCOUNT(SALES[Year-Month])
Thank you in advance,
PowerBI beginner.
Hi @zenonsbelskiss ,
You may change the measure like DAX below, which uses ALLSELECTED function to catch the filter.
Forecast 2019 =
CALCULATE ( SUM ( MANAGERS[Plan 2019] ) / 12, ALLSELECTED ( MANAGERS ) )
* CALCULATE ( DISTINCTCOUNT ( SALES[Year-Month] ), ALLSELECTED ( SALES ) )
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@zenonsbelskiss
I don't have enough information about your model, try this measure if it can be used. I supposed you have Dates table
Forecast 2019 =
VAR __YEAR = SELECTEDVALUE(DATES[Year]) RETURN
CALCULATE(
SUM(MANAGERS[Plan 2019])/12,
DATES[Year] <> __YEAR
)
*
DISTINCTCOUNT(SALES[Year-Month])
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 52 | |
| 45 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 141 | |
| 114 | |
| 50 | |
| 37 | |
| 30 |