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.
Hello, I have a matrix that in the columns has the date of each content, however there are contents that do not have the date, for example, 21/11. I don't have this date in my database, how could I create non-existent dates?
@Anonymous
Solved! Go to Solution.
Hi @cleytonp
You can try this,
(1) create a calendar table
Calendar = CALENDAR(DATE(2021,11,1),DATE(2021,11,6))
(2) create the measure when there's no relationship between the 2 tables,
Measure = CALCULATE(MAX('Table'[value]),'Table'[date]=MAX('Calendar'[Date]))
Kindly note: don't forget to select show items with no data
Besides, you can also create a relationship between the 2 tables by date column, in this scenario, you don't need to create the measure to get the value. You can directly put date column from calendar table and value column from another table into the same matrix.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @cleytonp
You can try this,
(1) create a calendar table
Calendar = CALENDAR(DATE(2021,11,1),DATE(2021,11,6))
(2) create the measure when there's no relationship between the 2 tables,
Measure = CALCULATE(MAX('Table'[value]),'Table'[date]=MAX('Calendar'[Date]))
Kindly note: don't forget to select show items with no data
Besides, you can also create a relationship between the 2 tables by date column, in this scenario, you don't need to create the measure to get the value. You can directly put date column from calendar table and value column from another table into the same matrix.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
It is best practice to always use a separate Calendar table. By making a relationship from a Calendar table to your tables, and using the values in the Calendar table in your visual, you can have empty months displayed.
https://docs.microsoft.com/en-us/power-bi/guidance/model-date-tables
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |