Forum Discussion

porjaiko's avatar
porjaiko
Frequent Visitor
6 years ago
Solved

How to do Show Last Data by Month

How to do Show Last Data by Month?

 

If select BRN_CODE and show last date by month (red line).

follow in this pic.

 

 

I need you help.

Thank you

  • Hi porjaiko ,

     

    We can create two calculate columns to meet your requirement.

     

    1. Create a month column.

     

    Month = MONTH('Table'[Date])

     

     

    2. Create a date column that calculate the max date in the same month.

     

    Date Column = CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[BRN_CODE]=EARLIER('Table'[BRN_CODE]) && 'Table'[Month]=EARLIER('Table'[Month])))

     

     

    3. Then we can create a table visual and put the Date column in it.

     

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    BTW, pbix as attached.

3 Replies

  • porjaiko , View one of these two by month year column

     

    Month Year = format(Table[Date],"YYYYMM")

     

    lastnonblank(Table[Date],blank())
    lastnonblankvalue(Table[Date],max(Table[Date]))

  • v-zhenbw-msft's avatar
    v-zhenbw-msft
    Community Support

    Hi porjaiko ,

     

    We can create two calculate columns to meet your requirement.

     

    1. Create a month column.

     

    Month = MONTH('Table'[Date])

     

     

    2. Create a date column that calculate the max date in the same month.

     

    Date Column = CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[BRN_CODE]=EARLIER('Table'[BRN_CODE]) && 'Table'[Month]=EARLIER('Table'[Month])))

     

     

    3. Then we can create a table visual and put the Date column in it.

     

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    BTW, pbix as attached.

  • v-zhenbw-msft's avatar
    v-zhenbw-msft
    Community Support

    Hi porjaiko ,

     

    How about the result after you follow the suggestions mentioned in my original post?

    Could you please provide more details or expected result about it If it doesn't meet your requirement?

    If you've fixed the issue on your own please kindly share your solution.

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.