How to count [Total] where [Year] are in USER...

How to count [Total] where [Year] are in USERSETTINGS(Year_Option) ? THX

0 28 630
28 REPLIES 28

@Aleksi_Alkio

mail ?

How aboutโ€ฆ COUNT(SELECT(TableName[Total],[Year]=USERSETTINGS(Year_Option)))

@Aleksi_Alkio Thatโ€™s i try bur result is always the Count[Total] and not filter with YEAR

You can send it to aleksi@1track.com

@Aleksi_Alkio THX but it is OK. Praveen Seshadri have look into app and this is the solution:

It is because of a type mismatch.

USerSettings(Year_Option) is an EnumList of base type Text.

[Year] is a column of type Number.

You need to either convert the base type of the EnumList to Number. Or in the expression you can wrap [Annee] by a CONCATENATE()

IN(CONCATENATE([Year]), USERSETTINGS(Year_Option)) works the way you expect

I thought that I asked are they the same type;-)

@Aleksi_Alkio Yes of course. But for me it was OK, both are number. But one is EnumList and basetype was wrong set.

Are they both number fields?

Yes

Check them both with an simple expression for example in virtual column so you could see which one is not correct. USERSETTINGS(Year_Option) should give you 2018 or something.

@Aleksi_Alkio USERSETTINGS(Year_Option) return 2017,2018 itโ€™s OK.

SELECT(Liste[YEAR], True, True) return the same thing 2017,2018 COUNT(Liste[TOTAL]) return number with Total of 8

I try this but return me 0 (zero): COUNT(SELECT(Liste[TOTAL],Liste[YEAR]=USERSETTINGS(Year_Option)))

Then try COUNT(SELECT(Liste[TOTAL],IN([YEAR],USERSETTINGS(Year_Option))))

Return 0,0,0,0,0,0,0,0 instead of 8

What is the account ID and app name so I can check quickly, thanks.

How aboutโ€ฆ COUNT(SELECT(TableName[Total],[Year]=USERSETTINGS(Year_Option)))

@Aleksi_Alkio Thatโ€™s i try bur result is always the Count[Total] and not filter with YEAR

You can send it to aleksi@1track.com

@Aleksi_Alkio THX but it is OK. Praveen Seshadri have look into app and this is the solution:

It is because of a type mismatch.

USerSettings(Year_Option) is an EnumList of base type Text.

[Year] is a column of type Number.

You need to either convert the base type of the EnumList to Number. Or in the expression you can wrap [Annee] by a CONCATENATE()

IN(CONCATENATE([Year]), USERSETTINGS(Year_Option)) works the way you expect

I thought that I asked are they the same type;-)

@Aleksi_Alkio Yes of course. But for me it was OK, both are number. But one is EnumList and basetype was wrong set.

Are they both number fields?

Yes

Check them both with an simple expression for example in virtual column so you could see which one is not correct. USERSETTINGS(Year_Option) should give you 2018 or something.

@Aleksi_Alkio USERSETTINGS(Year_Option) return 2017,2018 itโ€™s OK.

SELECT(Liste[YEAR], True, True) return the same thing 2017,2018 COUNT(Liste[TOTAL]) return number with Total of 8

I try this but return me 0 (zero): COUNT(SELECT(Liste[TOTAL],Liste[YEAR]=USERSETTINGS(Year_Option)))

Then try COUNT(SELECT(Liste[TOTAL],IN([YEAR],USERSETTINGS(Year_Option))))

Return 0,0,0,0,0,0,0,0 instead of 8

What is the account ID and app name so I can check quickly, thanks.

@Aleksi_Alkio

mail ?

Top Labels in this Space