Forum Discussion
AlexisPREVOT
5 years agoResolver I
Sameperiod Last Year - Display Issue
Hi the community, Like many of you, I try to compare billing amounts from year to year. I used the "sameperiodlastyear" function but even if the calculation looks good, the values are not disp...
- 5 years ago
Hi,
Hello,
Thank you again for your answers.
By digging into the idea of filtering, I found a solution on the Internet in 2 steps:
1 calculated column : LastYear = DATEADD(Calendar[Date];-1;year)and 1 measure : CALCULATE(
SUM(LIGNES_FACT[LFC_FACTURE_CONSOLIDEE]);
FILTER(
All(Calendar);
CONTAINS(VALUES(Calendar[Last Year]);Calendar[Last Year];Calendar[Date])
)
)
selimovd
5 years agoMost Valuable Professional
Hey AlexisPREVOT ,
do you have a proper date dimensional table where each day in the desired time area (including weekends) appears once?
If that is the case did you mark it as data table?
If that is not the case try to add an ALL in you calculation:
TotalPREC =
CALCULATE(
SUM( LIGNES_FACT[LFC_FACTURE_CONSOLIDEE] ),
SAMEPERIODLASTYEAR( FACTURES[FCC_DATE] ),
ALL( FACTURES[FCC_DATE] )
)
All of the time intelligence functions only work with a proper date table.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi