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.
Hi.
I'm trying to setup a simple table using the PreviousMonth function.
The two measures are setup as follows:
Solved! Go to Solution.
Power BI is built so that it best functions when models are in a star schema. Time intelligence functions require this, specifically a date dimension table. You need to create a date dimension table, establish a relationship to your fact table, and adjust your DAX measure to utilize the date table.
Thank you very much - that solved the issue.
Power BI is built so that it best functions when models are in a star schema. Time intelligence functions require this, specifically a date dimension table. You need to create a date dimension table, establish a relationship to your fact table, and adjust your DAX measure to utilize the date table.
Hi Corey - thank you for the suggestion.
I created a date table, which lists all days (monthly), including all dates in my "Defender (facts)" table:
I linked them as follows:
..and I changed the calculation to:
Date tables need to have a contiguous series of dates. ( Each row is a day, not a month. ) Use the function CALENDAR with FIRSTDATE and LAST DATE to create a dynamic date table with a contiguous set of dates.
User | Count |
---|---|
117 | |
73 | |
58 | |
49 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |