Forum Discussion
DatesInPeriod with duplicate dates in fact table Unique in Calender table
- 3 years ago
Hi subhashg ,
The reason it is showing incorrect figures is because the formula is referencing the fact table date column instead of the calendar table. It is recommended that we always use fields from a dimension table in our visualization instead of the fact table in order to avoid unintentional issues like this. Modifying your dax formula to reference the calendar table date instead of the fact table date produces the following output for datesbetween.
Also, for datesinperiod, the same output was produced.
I attach the pbix file for your reference:
Hi subhashg ,
The reason it is showing incorrect figures is because the formula is referencing the fact table date column instead of the calendar table. It is recommended that we always use fields from a dimension table in our visualization instead of the fact table in order to avoid unintentional issues like this. Modifying your dax formula to reference the calendar table date instead of the fact table date produces the following output for datesbetween.
Also, for datesinperiod, the same output was produced.
I attach the pbix file for your reference: