Forum Discussion
Working with Measures
Hey PowerBI Community
I'm trying to recreate a function using measures on powerBI.
I managed to do it previously thanks to the help of Pattem but it was on calculated columns
https://community.powerbi.com/t5/Desktop/Excel-Function-To-Dax-Help/m-p/634110
I have a similar issue now but am working with measures on PowerBI.
Created Count per day = CALCULATE(COUNT(JiraDB[Issue no.]),JiraDB[CREATED])
Resolved Count per day = CALCULATE(COUNT('JiraDB (Resolved Date)'[Issue no.]),'JiraDB (Resolved Date)'[RESOLUTIONDATE])Total Issues Test 2 = [Created Count per day]-[Resolved Count per day]
I want to create a new measure called open production issues that will sum the current open issues (Total Issues Test 2) with the previous day open issues, to get the number of open production issues that day.
With calculated Columns I was able to use Earlier() to reference the previous value but I can't now when using measure.
Open Production Issue Test 2 = CALCULATE(SUMX(JiraDB,[Total Issues Test 2]), FILTER(JiraDB,[Total Issues Test 2]<=EARLIER[Total Issues Test 2])
What I have now but receving an error for using Earlier() on measure.
Any help will be appreciated!
Thank you so much!!
Benjamin Chee
2 Replies
- v-cherch-msftMicrosoft Employee
You may use MAX instead of EARLIER function.Here is the similar post for your reference.If you need further help,sample data and expected output will be helpful to provide an accurate solution.Please upload the .pbix file to OneDrive and post the link here or send me via private message. Do mask sensitive data before uploading.
Regards,
Cherie
- v-cherch-msftMicrosoft Employee
Could you tell me if your problem has been solved? If it is,kindly mark the helpful answer as a solution and welcome to share your own solution. More people will benefit from here. If not, please share more details for us so that we could help further on it.
Regards,