Forum Discussion
Max value with filters
Hey all!
I am trying to get the max value from a column, but I want to use filters:
Because the third line has no entries in August it's returning July, but I need for it in this example to return August.
I have this table, with the columns, Date, Category and Number of service call:
And I want to make a table that has:
This month and should be the latest month on the filter regardless if there are any service calls for this category this month, Last month should be This month -1.
I am using max, but if I select two or more months the categories that have no Calls in one month will have a This month value different.
I am also not able to create tables os columns, just measures on Power BI Desktop.
Thanks for the help!
1 Reply
- amitchandak
Super User
JoseSugaharaAlv , With help from a date table you can use time intellignece
MTD Sales = CALCULATE(Distinctcount(Table[Call_ID]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(Distinctcount(Table[Call_ID]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKATime Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s