Forum Discussion

Chandrasekar_M's avatar
Chandrasekar_M
Frequent Visitor
2 years ago
Solved

Date Slicer between option

I have two tables in my spreadsheet, one is the current status which is updated from day to day based on the recruitment actions, another is the status of all positions at the end of the day which is saved as the daily status and uses the daily status numbers.

in the first row, there is only one position ID where we store the status for that position,

the second line is daily, for each day the position ID is saved as the status.

when I select the date in the slicer, the status from and to the date for the first line is displayed in

in the second line, the selected values of the end date should be displayed, but the aggregated values of the dates from and to are displayed.

if you can help me clarify this problem, please let me know

 

reprot link for reference.

https://app.powerbi.com/links/IAGgxG42bn?ctid=7a823e81-3527-485c-a629-67235afb2fa8&pbi_source=linkShare&bookmarkGuid=23692f70-68fb-434a-9d56-e6b5745b34ec

 

  • v-zhangti's avatar
    v-zhangti
    2 years ago

    Hi, Chandrasekar_M 

     

    You can try the following methods.

    Measure:

    Last Date = CALCULATE(MAX('Date'[Date]),FILTER(ALL('Date'),[Date]=MAX('Date'[Date])))
    Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Date]=[Last Date]))

    Please see the attached document.

     

    Best Regards,

    Community Support Team _Charlotte

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

4 Replies

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, Chandrasekar_M 

     

    It shows that you do not have permission to open your report. Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

     

    Best Regards,

    Community Support Team _Charlotte

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

  • Hi Thank you for your time and reply, 

     

    here with attached the print screen of the report, the second row is showing the data of 1st Jan to 22nd Nov but I need the only the last date value for second row.

     



    • v-zhangti's avatar
      v-zhangti
      Icon for Community Support rankCommunity Support

      Hi, Chandrasekar_M 

       

      You can try the following methods.

      Measure:

      Last Date = CALCULATE(MAX('Date'[Date]),FILTER(ALL('Date'),[Date]=MAX('Date'[Date])))
      Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Date]=[Last Date]))

      Please see the attached document.

       

      Best Regards,

      Community Support Team _Charlotte

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

      • Chandrasekar_M's avatar
        Chandrasekar_M
        Frequent Visitor

        I have achived this with below dax .

         

        VacanciesForLastDate =
        CALCULATE (
            SUM (Ncore_PositionGroupDailyStatus[vacancies]),
            DATESBETWEEN (
                'Date'[Date],
                LASTDATE('Date'[Date]),
                LASTDATE('Date'[Date])
            )
        )
         
        thank you for your reply and time