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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
M_SBS_6
Helper V
Helper V

Filtered Calculation

Hi,

I need to create a new calculation for my table to remove the values prior to current month. 

 

The calculation will need to be something like this but not too sure on the correct syntax.

 

Calculate(

sum(apps[app_amount),

Apps[info] in {"test","live"}

&& month_index[month] less than month (today()), 0 else apps[app_amount])

1 ACCEPTED SOLUTION

Sorry I was a little fast it need to be sum(apps[app_amount])))

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

It could make sense to add a column to your model's Date or Month table to show a value [Months From Current], where all dates within the current month have a value zero (0), and the prior month has value -1, two months prior -2, etc. Next month would have a value +1, two months into the future +2, etc. This would allow you to expand your queries to show "n months from current" or allow users to filter their choice of months from current. Plus, the DAX could be simplified.

ThomasWeppler
Impactful Individual
Impactful Individual

Try this
Name =

Calculate(sum(apps[app_amount),

if(SELECTEDVALUE(

Apps[info]) in {"test","live"} &&
SELECTEDVALUE(
month_index[month]) < today(),
0,
apps[app_amount]))

Thanks for the suggestion but unfortunately, the final part of the logic "apps[app_amount]))" isn't being accepted. I just have the red line underneath. 

Sorry I was a little fast it need to be sum(apps[app_amount])))

Thanks for your help 

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.