Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
i'm stucked with a set expression problem.
I've created two measures, let's call them SelectedYearMeasure and PreviousYearMeasure, that i've correctly replicated in my model.
I'm working on the year column of my mastercalendar table.
The problem is that, if I try to add Year as a column in my table, i get a doubled row, one for the year selected and one for the previous year.
Is there any possibility to avoid this behaviour, just having selected year row?
Thanks.
Hi @aresb
There are two approaches that you might want to take.
One is to have the Year as a measure rather than a dimension. You can create it like this:
=max(Year)
The other approach, and I would probably tend towards this, is rather than having a new column with the year in, use the fact that you can have a dynamic column header to stamp the year. In the Label of the measure have something like ='Sales ' & max(Year) and for the other ='Sales ' & (max(Year)-1).
Hope that helps.
Steve
Hi @aresb
There are two approaches that you might want to take.
One is to have the Year as a measure rather than a dimension. You can create it like this:
=max(Year)
The other approach, and I would probably tend towards this, is rather than having a new column with the year in, use the fact that you can have a dynamic column header to stamp the year. In the Label of the measure have something like ='Sales ' & max(Year) and for the other ='Sales ' & (max(Year)-1).
Hope that helps.
Steve