Forum Discussion
streep1
5 years agoRegular Visitor
Current Week/Year Values - With two different data sets in the same table.
Hello
I previously had a solved query regarding how to find the current week and the current year values by using -
CurrentWeekCurrentYear =
VAR CurrYear =
MAXX(allselected('Data'),'Data'[Current Year] )
VAR CurrWeek =
MAXX(Filter(allselected('Data'), 'Data'[Current Year] =CurrYear ),'Data'[Fin_Week_No_2_Char] )
RETURN
CALCULATE(
SUM('Data'[DERAnswer]),
FILTER(ALLSELECTED('Data'),[Fin_Week_No_2_Char]=CurrWeek && 'Data'[Current Year]=CurrYear),
VALUES('Data'[LDN_Region]),
VALUES('Data'[OrgName])
)
However now my data table has a new '[data_set]' flow - 'Data A' and 'Data B', as a result I am double counting values.
How can I filter by [data_set]?
I've been trying to include this within the VAR, but keep getting a Booleen error and the SEARCH isn't helping?
Any tips would be great! Many thanks
3 Replies
- v-kelly-msftCommunity Support
Hi streep1 ,
Can you attach the screenshot of your data model with the relationship?
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
- streep1Regular Visitor
Hello
Apologies - The data just comes as a flat file, with the [data_set] field distinguishing between A and B
Many thanks
P
- v-kelly-msftCommunity Support
Hi streep1 ,
Pls forgive my misunderstanding,do you wanna filter out the data by Date A and Date B?
Best Regards,
KellyDid I answer your question? Mark my post as a solution!