Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
By marking two years or more, the measure of the previous year is to be hidden. I do not know why but this measure does not work for me. Please help. The file is everything described
Solved! Go to Solution.
Hi @krzysztof ,
Here we can create two measures to work on it.
Salestotal = IF ( ISFILTERED ( 'Calendar'[Year] ), CALCULATE ( SUM ( sales[Sales value] ) ), CALCULATE ( SUM ( sales[Sales value] ), FILTER ( sales, YEAR ( sales[Date] ) = CALCULATE ( MAX ( 'Calendar'[Year] ), ALL ( 'Calendar' ) ) ) ) )
Previous = IF ( ISFILTERED ( 'Calendar'[Year] ), BLANK (), CALCULATE ( SUM ( sales[Sales value] ), SAMEPERIODLASTYEAR ( 'Calendar'[Date] ) ) )
Pbix as attached.
Reagrds,
Frank
Hi @krzysztof ,
Here we can create two measures to work on it.
Salestotal = IF ( ISFILTERED ( 'Calendar'[Year] ), CALCULATE ( SUM ( sales[Sales value] ) ), CALCULATE ( SUM ( sales[Sales value] ), FILTER ( sales, YEAR ( sales[Date] ) = CALCULATE ( MAX ( 'Calendar'[Year] ), ALL ( 'Calendar' ) ) ) ) )
Previous = IF ( ISFILTERED ( 'Calendar'[Year] ), BLANK (), CALCULATE ( SUM ( sales[Sales value] ), SAMEPERIODLASTYEAR ( 'Calendar'[Date] ) ) )
Pbix as attached.
Reagrds,
Frank
Hi @krzysztof ,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.
Regards,
Frank
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |