Hello everyone! I had a table that has a QUE...

Hello everyone!

I had a table that has a QUERY, where this QUERY sum´s and filter data for [Customer], by [$ total spend], [year] and [weeknum].

At this table I had this formua in a virtual column: SUM(SELECT(Query[$ total spend],[Customer]=[_THISROW].[Customer]))

Also had a virtual columns that belongs to the current weeknum

How can I filter the SUM formula to show only the total SUM for the current week of the year for each customer?

Many thanks!

0 8 384
8 REPLIES 8

SUM(SELECT(Query[$ total spend],AND([Customer]=[_THISROW].[Customer],[Year]=YEAR(TODAY()),[Weeknum]=WEEKNUM(TODAY()))))

@Aleksi_Alkio

Is is not filtering by week. As it shows in the picture, is SUM´s but not maing the filter per week/per year

 

At least one comma s missing…

@Aleksi_Alkio

I check the comma´s and I think there are ok. May be this happen beacause of the Computedkey?

Did you find the missing comma from here… YEAR(TODAY()),[Weeknum]

@Aleksi_Alkio

=SUM(SELECT(Query[Driver Up to today],AND([Driver]=[_THISROW].[Driver],[Year]=YEAR(TODAY()),[Week]=WEEKNUM(TODAY()))))

Still not showing a good SUM result when I check on “Test”. The math doesn´t fix to the formula in the “Test”

Well… do you think the query is correct in generally?

Top Labels in this Space