Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Solved! Go to Solution.
I think you need to have a datetime dimension table. If you don't have, you need to create one first.
You can set up the date scope of that table.
Then you build relationship with your fact table. I think in the real data the relationship here should be one to many
At last, you can use DAX to get the date 45 days ago.
Hope this is helpful.
Thanks and BR
Ryan
Proud to be a Super User!
I think you need to have a datetime dimension table. If you don't have, you need to create one first.
You can set up the date scope of that table.
Then you build relationship with your fact table. I think in the real data the relationship here should be one to many
At last, you can use DAX to get the date 45 days ago.
Hope this is helpful.
Thanks and BR
Ryan
Proud to be a Super User!
Thanks @ryan_mayu for your simple solution and detailed explanation. t by creating a new column in my Data Model. Where I was not going anywhere was because I was trying to get this done by just one DAX formula and only virtual tables. Maybe I need to use things like CALCULATETABLE and VARIABLES to get it done.
nonetheless, appreciate your input and have already implemented it to my model. Again, thanks a lot
Hi @RodBaylon
Your question is not very much clear, it seems like you are looking for something that can be acheived with the DATEADD function.
To get your question answered quick please see this post.
Regards
Affan
Hi @affan, thanks for the feedback. A summary of what I'm trying to do:
Column A is a date from the system and Column B is a calculated one (Column A - 45). And I'd to link values from column C to column B.
I understand I could have it done at query level however I would like to know if a measure with DAX could do the trick dynamically.
I tried DATEADD however it was not moving values (Column C) from dates in column A and associating to dates in Column B. Unless I am doing something wrong. DATEADD was looking for a past reference and because there is none, my next chart was empty.
thanks for the link, I'm going to check it out.
Welcome to Power BI Community.
Please share sample data and screenshots of the expected results 🙂
@OmegaHi, I'm still trying to figure out on how to attach files to this chat.
Inserted a pic of what I am trying to do in POWER BI.
Column A is a date from the system and Column B is a calculated one (Column A - 45). And I'd to link values from column C to column B.
I understand I could have it done at query level however I would like to know if a measure with DAX could do the trick dynamically.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |