Forum Discussion
Tooltip con SAMEPERIODLASTYEAR
Hola!!
Tengo una tabla en la que aparecen los importe relativos al año seleccionado y los importes del año anterior. He creado un tooltip pero, cuando me situo sobre los importes, si en el año seleccionado el importe es cero pero el anterior es mayor que cero, no me aparecen los datos. ¿Como puedo hacer para que me aparezcan en el tooltip los datos del año seleccionado y los del año anterior?
Hi 94veiga ,
If the dates in your original table are years,you could create below measures in tooltip table:
value for this year = CALCULATE(SUM('Table'[value]),ALLSELECTED('Table'[year]))value for last year = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[year]=SELECTEDVALUE('Table'[year])-1))+0And you will see:
Sameperiodlastyear function is a time intelligent function
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
2 Replies
- amitchandakSuper User
94veiga , Create a new measure like and use in visual.
Switch(True(),
isblank([This Year]) && not(isblank([Last Year])), 0 ,
[This year]
)
- v-kelly-msftCommunity Support
Hi 94veiga ,
If the dates in your original table are years,you could create below measures in tooltip table:
value for this year = CALCULATE(SUM('Table'[value]),ALLSELECTED('Table'[year]))value for last year = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[year]=SELECTEDVALUE('Table'[year])-1))+0And you will see:
Sameperiodlastyear function is a time intelligent function
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!