Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi All, i am trying to calculate the max value from a selected date and am using the below measure which is working fine
Max Peak Value Selected Date A =
CALCULATE (
MAX (TableXYZ[Col B]), TableXYX[Col A] = "123"
&& TableXYZ[Reporting_Date] = SELECTEDVALUE ( 'Calendar Dim'[Date] ) )
I now want to calculate the max value for the day before the selected date and when i put in a SELECTEDVALUE ( 'Calendar Dim'[Date] )-1 i get blank
Max Peak Value Selected Date A =
CALCULATE (
MAX (TableXYZ[Col B]), TableXYX[Col A] = "123"
&& TableXYZ[Reporting_Date] = SELECTEDVALUE ( 'Calendar Dim'[Date] ) -1)
i have created a measure and seen in a card i am getting the previous date to the selected one - Selected Date - 1 = SELECTEDVALUE('Calendar Dim'[Date])-1
i dont understand why it isnt working in the measure. thanks amrita
Solved! Go to Solution.
this worked:
this worked:
Hi @amrosullivan ,
Please try this:-
Max Peak Value Selected Date A =
VAR selected_date =
SELECTEDVALUE ( 'Calendar Dim'[Date] ) - 1
RETURN
CALCULATE (
MAX ( TableXYZ[Col B] ),
TableXYX[Col A] = "123"
&& TableXYZ[Reporting_Date] = selected_date
)
BR,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi that is still returning blank.
@amrosullivan , I am hoping you have checked the data and It have some data for selected date..right?
You could also try this:-
Max Peak Value Selected Date A =
VAR selected_date =
SELECTEDVALUE ( 'Calendar Dim'[Date] ) - 1
RETURN
CALCULATE (
MAX ( TableXYZ[Col B] ),
FILTER (
TableXYX,
TableXYX[Col A] = "123"
&& TableXYZ[Reporting_Date] = selected_date
)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
this is returning blank too.
i do have data for the previous date. when ir emove the - 1 and select the previous date i det the required value.
thanks!
@amrosullivan is it possible for you to share your PBI after removing sensitive data?
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
84 | |
83 | |
67 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |