Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.