Forum Discussion
Measure to isolate specific field
- 4 years ago
Please see the attached PBIX, created a measure that could work
You need to wrapped the averagex inside a calculate like:
Avg Per Month Demand =
CALCULATE(AVERAGEX(VALUES('Test Python Exam'[AD_CalYrMth]),[Count of AD_Event_Key average per AD_CalYrMth]),
'Test Python Exam' [AD_Data]= "Demand",
'Test Python Exam'[AD_Examination_01]<>"CLDTH",
'Test Python Exam'[AD_CalYr]<>2099,
NOT ('Test Python Exam'[AD_Room] IN {"CTSIM","CTSIM2"}))
richbenmintz
If I wanted to compare current month, using the above 'Average Per Month' measure syntax - against last months average, how would this look? Or against the same month, two years ago, or against a specific month such as 2019-03??
Can PowerBI do this easily, without me needing to change the syntax every month to suit?
- richbenmintz4 years agoResident Rockstar
Hi Creative_tree88 ,
here is a really great reference for you from the wonderful people at SQLBI, they are pretty much the best!
- Creative_tree884 years agoHelper V
richbenmintz
Thanks for this - it's a little too complex for my needs at this point, I think. I already have a calendar table set up and linked, so really just need to get the syntax sorted. If you can help with this, it would be much appreciated.- richbenmintz4 years agoResident Rockstar
Hi Creative_tree88 ,
Power BI has a whole set of Time intelligence functions, https://docs.microsoft.com/en-us/dax/time-intelligence-functions-dax , If you provide a link to a pbix file i can show you some examples with your data model