Forum Discussion
Anonymous
4 years agoNot applicable
Measure with IF statement in DATE
I am new to this community and looking for help with a measure having IF statement using dates. I have fiscal year to date Operating Revenue, but I would like to calculate monthly operating revenue,...
- 4 years ago
You can use a measure like this:
Monthly Operating Revenue = VAR __SelectedMonth = SELECTEDVALUE( DateDim[Month] ) VAR __MonthlyOperRev = IF ( __SelectedMonth = "January", "Whatever you want in case of January", [Total Operating Revenue]-[Monthly Operating Revenue], ) RETURN __MonthlyOperRevPlease give it a thumbs up if this helps!
amitchandak
Super User
4 years agoAnonymous , You should use date table for time intelligence and date table should be marked as date table
Parallel Period Operating Revenue = CALCULATE(SUM('Revenue Table'[Total Operating Revenue]), PARALLELPERIOD('Date'[Date], -1, MONTH) )
or
Parallel Period Operating Revenue = CALCULATE(SUM('Revenue Table'[Total Operating Revenue]), dateadd('Date'[Date], -1, MONTH) )
Anonymous
4 years agoNot applicable
Thank you for replying. I understand the parallel period part, I am stuck with the part where I want to avoid the calculation for month of January. Can you help me with writing a measure for that. I have mentioned it in the original post.