cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
streep1
Regular 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 3
v-kelly-msft
Community Support
Community Support

Hi @streep1 ,

 

Can you attach the screenshot of your data model with the relationship?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Hello

 

Apologies - The data just comes as a flat file, with the [data_set] field distinguishing between A and B 

 

Many thanks

 

P

Hi @streep1 ,

 

Pls forgive my misunderstanding,do you wanna filter out the data by Date A and Date B?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!