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
djh
Frequent Visitor

Revenue compared to rest of Region

Hi All,

 

New to Power BI, and struggling with what seems very simple in excel.

 

I have a transactions table, and a customer table. The customer table contains a field for region, and is linked to the transaction table via the customer #.

 

There are two questions i want to know about my data. firstly, how are my YTD sales with a March year end compared to the prior year, and how are year sales compared to others in the same region.

 

i tried to do a calculate, but couldn't work out how to refer to the region for every row?

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi djh,

 

If you are using import mode, follow DAX formula patterns like below:

 

YTD Sales =
TOTALYTD ( SUM ( Transactions[Sales] ), Transactions[Date], "3/31" )

YTD Sales On Region =
TOTALYTD (
SUM ( Transactions[Sales] ),
Transactions[Date],
ALLEXCEPT ( Customer, Customer[Region] ),
"3/31"
)

 

Regards,

Jimmy Tao

 

 

 

 

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi djh,

 

If you are using import mode, follow DAX formula patterns like below:

 

YTD Sales =
TOTALYTD ( SUM ( Transactions[Sales] ), Transactions[Date], "3/31" )

YTD Sales On Region =
TOTALYTD (
SUM ( Transactions[Sales] ),
Transactions[Date],
ALLEXCEPT ( Customer, Customer[Region] ),
"3/31"
)

 

Regards,

Jimmy Tao

 

 

 

 

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.