Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi
I have a Fact table and a Season table
The Season dimension has a Season.LastYearSeasonID (doing a calendar isn't possible I think as i have multiple concurrent seasons)
If I add slicer for Fact.SeasonID and then two measures of
LastSeason = LOOKUPVALUE (
'DimSeason'[LastYearSeasonID],
'DimSeason'[SeasonID], 'FactLine'[SeasonId]
)
and
LinesLY =
VAR LY = min('FactLine'[LastSeason])
RETURN CALCULATE (
COUNT('FactLine'[SFID]),
FILTER ( ALL('FactLine'[SeasonID]),'FactLine'[SeasonID]=LY)
)
then LinesLY works fine, all good
But here's the weird thing, if I change my slicer to DimSeason.SeasonDesc then LinesLY is blank
What's going on here? Any suggestions of things to try are welcome
regards
ol
Solved! Go to Solution.
@oliverpenney , not very clear.
if you have a nonstandard calendar like Year and period and Year and Season, then have a separate table for that and Create Rank for Year Season (YYYYSS) //number
Period Rank = RANKX(all('Period'),'Period'[year period],,ASC,Dense)
This Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])))
Last Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])-1))
This Year Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period]=max('Period'[Period]) && 'Period'[Year]=max('Period'[Year])-1))
many thanks, that nudged me towards using the suffix field i had in my season dimension and...
@oliverpenney , not very clear.
if you have a nonstandard calendar like Year and period and Year and Season, then have a separate table for that and Create Rank for Year Season (YYYYSS) //number
Period Rank = RANKX(all('Period'),'Period'[year period],,ASC,Dense)
This Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])))
Last Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])-1))
This Year Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period]=max('Period'[Period]) && 'Period'[Year]=max('Period'[Year])-1))
User | Count |
---|---|
64 | |
59 | |
47 | |
33 | |
32 |
User | Count |
---|---|
84 | |
75 | |
56 | |
50 | |
44 |