Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
I'd like to compare current year value with previous year for the same month
How to get the value of the month on mouse hover on a bar chart
Here year 2026 is selected, and I want to see feb 2025 value in the popup
Popup title
='Nombre de déclarations '& MyMonth & ' '&(MyYear-1)
==> can't display hovered month
Popup value
Count(distinct {<MyYear={"$(=MyYear-1)"}>}IDDeclaration)
==> here value is 0 in my dataset, but I'll check later on PreProd
==> I need to add hovered month in the set analysis
Thanks for the help
I think the MyMonth within title is superfluous because this information comes already from the bar.
Also the set analysis for the value doesn't need the month - to adjust the year-state should be enough to get the results from the previous year and the belonging month relates again to the bar.
Indeed, indeed,
I just wanted to display something like
"Variation compared to Feb. 2025"
instead of
"Variation compared to 2025"
or
"Variation compared to same month 2025"
Actually @marcus_sommer my customer really wants it
If I'm today 20th March 2026, and he puts his mouse over the March bar, then he wants to see in the hint :
"Value up to 20th March 2025"
it works with the measure of the hint, but not with the label of the hint.
I've used this
if([MyYear]=year(today()) and MyMonth=Month(today()),
{<[MyYear]={"$(=([MyYear])-1)"}, MyMonth={"$(=Month(today()))"}, Date_reservation={"<=$(=makedate(([MyYear])-1, Month(today()),day(today())))"} >} [MyMeasure]
,
{<[MyYear]={"$(=([MyYear])-1)"}>} [MyMeasure]
)Here it should display : 'Nombre de réservations brutes au 20 Mars 2025'
I'm not quite sure but I could imagine that your issue is related to the relation of the object-property and the object-dimensions - which may not exists respectively means that calculations within labels/titles ... may not respect the dimension-level and calculated globally.
You may try to outsource some parts of the logic within a variable and then using the variable or maybe better in regard to the usability to integrate the max. date-information within the chart-title - why should it be needed to hover over a bar to see that the chart-view has extra restrictions.