Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Lookup value for same day last month

Hi,

 

As a DAX beginner, I woul really appreciate some assitance from this community. Please allow me to explain

What I’m trying to do here is to visualizable success rate based on the number of successfull attempts vs the attempts.

  • Per day
  • Per person

For this I Have fairly easy model with a data table and a date/calendar table

vszah_0-1597418371921.png

 

Now the tricky bit:

 

What I would like to do is to compare the success rate of a person to the same rate a week before

 

Example

  • 10/1/20: Success rate for participant ID0-105 is= 72%
  • 09/1:20: (same day last month) the success rate for participant ID0-105 is = X

 

What I’m struggling with is to find a way to retrieve the information of the ‘same day last month’

 

I would like my dashboard ot behave like this

  • Select a date
  • See the Success rate for that date
  • See the Success rate for the same day last month
  • Compare both to check if it’s better or worse through conditional formatting (easy)

    vszah_2-1597418371929.png

So far I’ve been able to calculate the last month date with a “edate fucntion” but I struggle to find the right logic to also get the values of the selected date -1

 

if you want tot take a look at my pbix file: https://we.tl/t-R7InaeWHWE

 

Is there anyone here available to help me take my Power BI skills to the next level?

 

Many thanks

 

 

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1597642698031.png

 

Best regards,
Lionel Chen

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

View solution in original post

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1597642698031.png

 

Best regards,
Lionel Chen

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

parry2k
Super User
Super User

@Anonymous As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.

https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-calculations/

 

question is what you want to do when the current month is 31 days and the previous month is 30 days??

 

although you can use EDATE DAX  function to get the previous month, same date.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

i did use edate function to get the 'same day last month' but now I want to use this to lookup to date value and retrieve the attemps and success rates this day, how can I do that?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.