Forum Discussion

jackypatel's avatar
jackypatel
Icon for Helper I rankHelper I
1 year ago

Need Last Month Data in My Card View

I have a calender that contain April is the starung Month & March is the Last Month of the year. For Example i have data like Month & Return as mention below

 

MonthReturn
Apr-2353690
May-2354402
Jun-2340245
Jul-2352303
Aug-2334513
Sep-2351151
Oct-2344559
Nov-2350948
Dec-2369529
Jan-2461732
Feb-2453498
Mar-2453498
Apr-2453690
May-2454402
Jun-2440245
Jul-2452303
Aug-2434513
Sep-2451151
Oct-2444559
Nov-2450948
Dec-2469529
Jan-251732
Feb-253098
Mar-25 

 

Also I Have Year Filter 2023-24 & 2024-25

Now If i select 2023-24 than data should be Mar-24 Return (53498) & If i Select 2024-25 than Feb-25 Return (3098).

 

And I Add add data Of Mar-25 in next Month so 2024-25 Return Value Should be Mar-25 (Data)

 

Plz help me.

10 Replies

    • jackypatel's avatar
      jackypatel
      Icon for Helper I rankHelper I

      i am unable to attached the File. Data is already There.

       

       

      Plz help

    • jackypatel's avatar
      jackypatel
      Icon for Helper I rankHelper I

      Thanx for you support, But Its Not Working. If i added Mar-25 Data than it is also Showing Feb-25 Data.

       

      Plz guide us further 

      • PijushRoy's avatar
        PijushRoy
        Icon for Community Champion rankCommunity Champion

        Hi jackypatel 
        I have check with Feb 2025 data and without data, now working.
        Please use the measure in same PBIX file

        Latest Month Return = 
        VAR SelectedYear = SELECTEDVALUE('Table'[Year]) 
        VAR MaxMonthNo =
            CALCULATE(
                MAX('Table'[Fiscal_Month_No]), 
                FILTER('Table', 'Table'[Year] = SelectedYear)
            )
        VAR LatestMonthReturn =
            CALCULATE(
                MAX('Table'[Return]),
                FILTER('Table', 'Table'[Fiscal_Month_No] = MaxMonthNo && 'Table'[Year] = SelectedYear)
            )
        VAR PreviousMonthReturn =
            CALCULATE(
                MAX('Table'[Return]), 
                FILTER('Table', 'Table'[Fiscal_Month_No] = MaxMonthNo - 1 && 'Table'[Year] = SelectedYear)
            )
        RETURN
            IF(
                ISBLANK(LatestMonthReturn), 
                PreviousMonthReturn, 
                LatestMonthReturn 
            )
  • v-menakakota's avatar
    v-menakakota
    Icon for Community Support rankCommunity Support

    Hi jackypatel ,

    I hope the provided  information by PijushRoy  is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution so others can find it easily.

    Thank you.

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

      Hi jackypatel ,

      May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

      Thank you.

       

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

        Hi  jackypatel  ,

        I would also take a moment to thank PijushRoy  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference. 

        I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the  response has addressed your query, please accept it as a solution so that other community members can find it easily. 

         
        Thank you.