Forum Discussion
flaviobdsti
Helper I
3 years agoFilter based metric sum
Hi Guys! Please I need your help! I have two measurements, LAST MONTH and CURRENT MONTH, both measures group sales values by CODE. When I put the two measures together with the CODE field in a t...
- 3 years ago
Hi,
This measure works. Download the PBI file from here.
Measure = SUMX(FILTER(SUMMARIZE(CALCULATETABLE(VALUES('Table'[ID]),DATESBETWEEN(dimCalendar[Date],EDATE(MIN(dimCalendar[Date]),-1),min(dimCalendar[Date])-1)),'Table'[ID],"A",[CURRENT_MONTH],"B",[LAST MONTH]),[A]=0&&[B]>0),[B])Hope this helps.
flaviobdsti
Helper I
3 years agoThank you for answering my message
I created a .pbix file as an example. I put it in a repository, in the link below:
Ashish_Mathur
Super User
3 years agoHi,
This measure works. Download the PBI file from here.
Measure = SUMX(FILTER(SUMMARIZE(CALCULATETABLE(VALUES('Table'[ID]),DATESBETWEEN(dimCalendar[Date],EDATE(MIN(dimCalendar[Date]),-1),min(dimCalendar[Date])-1)),'Table'[ID],"A",[CURRENT_MONTH],"B",[LAST MONTH]),[A]=0&&[B]>0),[B])
Hope this helps.
- flaviobdsti3 years ago
Helper I
Hi Ashish Mathur,
I hope someday achieve your level. Thank you so much for your help. Worked perfectly!- Ashish_Mathur3 years ago
Super User
You are welcome. Thank you for your kind words.