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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
Super User
Super User

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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