Forum Discussion
Measure to Group Data
Hi,
I am using a Tabular live connection, and I need to group my stock value into Seasons.
If it was imported data I would just add a column like below, but how do I get that to work in a measure?
IF(MONTH([Last Invoice Date])<7;"SS"&YEAR([Last Invoice Date]);"AW"&year([Last Invoice Date])))
Then I would use this measure as columns in a Matrix.
I hope it makes sense what I am asking for.
Thanks,
5 Replies
- Greg_Deckler
Community Champion
You need to wrap an aggregation function around your columns like MAX, MIN, SUM, FIRSTNONBLANK, LASTNONBLANK, AVERAGE, etc.
- AnonymousNot applicable
Hi,
It does not work. It only returns AW19. Furthermore, I can only add this to values, I need it in Columns of my Matrix.
Season = MAX([Last Invoice Date];IF(MONTH([Last Invoice Date])<7;"SS"&YEAR([Last Invoice Date]);"AW"&year([Last Invoice Date])))
I need to create below Matrix.
I do not know if it matters that Last Invoice Date is a measure.
Thanks,
- nhoward
Resolver I
Hi,
Measures are only meant for values.
Your seasons are dimensions. Assuming you have a Calendar Table, you need a column in there, that shows the Season that each day belongs to. You can then use that column as a column in your Matrix. It would work in a similar way to having Quarters in your calendar.
Hope that helps.