The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello everyone,
I have two tables :
- DIM_Period which is a date table, containing [ID_Period] (integer), [Period] (text) and [Date] (date)
- FACT_Table wich is the tbale where my values are stored, containing [ID_Period] (integer) and [Value] (integer)
I am trying to display in a visual the sum of value for current month and for previous month for a selected period, like this :
But in order to reduce report size, I mapped the DIM_Period table to my FACT_Table with IDs of integer type (because integer type is less size consuming than date type).
So my relationship looks like this :
And here is my problem : I can't find a way to use PREVIOUSMONTH or DATEADD correctly with that case.
I created a mesaure like this :
Does someone can help me with that problem ?
I would like to continue mapping the DIM & FACT tables with ID relationship
Thank you
Solved! Go to Solution.
It is best practice to use calendar "offsets"
Learn about "offsets" here Click here for Offset tutorial video
Thanks for the clear description of the problem with example data. I wish everyone did that!
Remember we are unpaid volunteers, and you have got free expert help which took a lot of effort,
This solution works and does exactly what you asked.
So please quickly click the [accept as solution] and the thumbs up button to leave kudos.
One question per ticket please. If you need to change or extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
If you quote @speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.
Please now click the [accept as solution] and the thumbs up button. Thank you.
It is best practice to use calendar "offsets"
Learn about "offsets" here Click here for Offset tutorial video
Thanks for the clear description of the problem with example data. I wish everyone did that!
Remember we are unpaid volunteers, and you have got free expert help which took a lot of effort,
This solution works and does exactly what you asked.
So please quickly click the [accept as solution] and the thumbs up button to leave kudos.
One question per ticket please. If you need to change or extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
If you quote @speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.
Please now click the [accept as solution] and the thumbs up button. Thank you.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
94 | |
93 | |
88 | |
70 | |
65 |
User | Count |
---|---|
231 | |
127 | |
117 | |
82 | |
82 |