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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors