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.
Hi,
I have been trying to use the DATEADD function to compute a certain attribute "cost" for the previous Month.
I'm using a horizontal bar graph. The Date Attribute for the table containing cost is not contigous - Table 1 . However I have created a set of disntict dates in another table - Table 2. I have related the two tables as a many to one relation. I use the Date column from table two as a argument to Dateadd. However my the aggregation of the previous cost is wrong.
Solved! Go to Solution.
As you said, you fact table has many to one relationship to your date dimension table. Since you have multiple entries for same date in fact table, you need to use ALLEXCEPT() function to group the calculation.
And make sure you include the date field from date dimension into visual.
Regards,
As you said, you fact table has many to one relationship to your date dimension table. Since you have multiple entries for same date in fact table, you need to use ALLEXCEPT() function to group the calculation.
And make sure you include the date field from date dimension into visual.
Regards,
Hi @sa1
In order for the DateAdd to work you need to have a Date table.
You can create one using my blog post here: https://www.fourmoo.com/2016/09/13/power-bi-how-to-easily-create-dynamic-date-tabledimension-with-fi...
Then you can relate your table to this Date Table.
Once you have done that you can then use the DATEADD function using the above created Date table.
Hi,
I already have a table with only Disntict Date Values
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |