Forum Discussion
Matrix visual, MoM values shown as zero (Power BI desktop)
- 8 months ago
I created the Relationship, DateTime[Date] to a_InitialData[OrderDate], 1 to many, single direction, and made sure the dates are of the same type (Short date)You mean the columns have the same data type or simply have the same format? Make sure they're both type date, no either type date or datetime.
That aside, the main reason you’re getting an incorrect MoM value is that you’re using one variable inside another while trying to change its filter context. Variables are immutable, so the first two variables will return the same results. Instead of reusing CurrentMonthValue in the second variable, use the SUM expression directly.
I created the Relationship, DateTime[Date] to a_InitialData[OrderDate], 1 to many, single direction, and made sure the dates are of the same type (Short date)
You mean the columns have the same data type or simply have the same format? Make sure they're both type date, no either type date or datetime.
That aside, the main reason you’re getting an incorrect MoM value is that you’re using one variable inside another while trying to change its filter context. Variables are immutable, so the first two variables will return the same results. Instead of reusing CurrentMonthValue in the second variable, use the SUM expression directly.
danextian thanks for your quick reply.
Columns should!!! have the same data type, and format. Original .csv has Order_date values as 2023-01-01 and the DateTable was based on this field...
Variables, I will try your idea of course, but as an amateur Visual Basic programmer, I find it difficult to this being the case. I would be very happy if it is though😀