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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bdehning
Post Prodigy
Post Prodigy

Need help with Column Measure to restrict data

I use the following measure as a filter on my Column Chart, so I can Show Items when the value is less than or equal to what ever number of months I want.    I use a count +0 to show zero data months.  What can I add to the measure as a Var to restrict months to a start date field I have for each company but allow 60 months if company had Start Date over 5 yearsa go.       

My current issue is that, if I select 6 months with the measure filter, but company Start Date is only two years back, I see 40 months of zeros I don't want.   

 

Rolling Month =
VAR __MAX_DATE =
    MAX ( 'LossRun'[Loss Date] )
RETURN
    DATEDIFF ( 'LossRun'[Loss Date], __MAX_DATE, MONTH ) + 1
1 REPLY 1
sayaliredij
Solution Sage
Solution Sage

HI @bdehning 

 

Can you share pbix file with some sample data?

 

Thanks,

Sayali





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

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors
Users online (5,594)