Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I am trying to create a stacked area chart but I don't have the data for certain dates. Meaning there's no rows associated with certain date, it's not the case that there are rows with null or 0. I am trying to show those missing data as 0. Any idean how to do that? I tried the formula to do a sum then +0, and it didn't work. I am also trying to aviod the way of creating a new time table( because I already created one in the model and it can't be used for this visual). Any idean how to do this with just DAX formula?
Here are the data:
Time | Group | Sales |
2021-07-15 0:00 | A | 4003.884067 |
2021-07-31 0:00 | A | 6020.133462 |
2021-07-31 0:00 | B | 792.3333333 |
2021-07-31 0:00 | C | 1483.950956 |
2021-08-15 0:00 | A | 4275.699444 |
2021-08-15 0:00 | B | 542.3333333 |
2021-08-15 0:00 | C | 365.5340079 |
2021-08-31 0:00 | A | 6240.695745 |
2021-08-31 0:00 | B | 542.3333333 |
2021-08-31 0:00 | C | 1557.116907 |
2021-09-15 0:00 | A | 3040.167482 |
2021-09-15 0:00 | B | 542.3333333 |
2021-09-15 0:00 | C | 593.8743489 |
2021-09-30 0:00 | A | 819.5815928 |
2021-09-30 0:00 | B | 542.3333333 |
2021-09-30 0:00 | C | 448.5754824 |
I am trying to achieve below, have area filled under the two arrows.
Solved! Go to Solution.
Hey @windynan ,
the problem is not the measure, the problem is the data model.
I would highly recommend to create a dimensional date table, connect it to your fact table (the sample table you posted) and use that date table for your visuals. Then you won't have gaps and also the time intelligence functions will work.
Take a look on how to do that:
Power Bi for Beginners: How to create a Date Table in Power Bi - Softcrylic
Hey @windynan ,
the problem is not the measure, the problem is the data model.
I would highly recommend to create a dimensional date table, connect it to your fact table (the sample table you posted) and use that date table for your visuals. Then you won't have gaps and also the time intelligence functions will work.
Take a look on how to do that:
Power Bi for Beginners: How to create a Date Table in Power Bi - Softcrylic
Thanks @selimovd. I guess this is a way to do it. I ended up creating a new column in my original time table. It works. thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
79 | |
52 | |
49 | |
47 |