However, it does not calculate the value for all areas. I exported the data into excel and quickly generate the desired result as shown in the following picture:
For example, area highlighted in red color has value in the desired result but output produced by the measure have 0 values for the same area.
I have attached the sample file. Could anyone help me where I made the mistake? sample5.pbix (677.3 KB)
Your measure is calculating zero, so its your measure. I’d first add a proper [Dates] table, link it properly to the (I guess) [Cancelled Date (NZST), and copy-and-paste your bar chart into a table for development; add all of the columns used in the calculation of your measure, and hopefully the correct calculation will become apparent.
Hi @leo_89. Sorry, I don’t understand: you have an additional [Data] table or do you have a [Dates] table? Are you saying that the PBIX you sent is not your work-in-progress? Perhaps you could provide a sample dataset in Excel, what the table would look like in Power BI, along with an Excel or screenshot mockup of your desired outcome? These would help the forum members visualize your issue.
Greg
I have additional [Date] table in my actual file. There are quiet a few tables in my actual file. To avoid the complexity, I just used the main columns from fact table to re-create the issue I am having in my actual file. I have provided the date table in the sample file now and also included the desired output as screen shot.
To see this in action, I created a “Detail” table that showed you measure accurately calculated the value per event, but when the event context is removed and you want the summarized value for each area, you need to add a virtual table. Here’s one measure that seems to match your expected values: