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
slavisha84
Helper I
Helper I

How to aggregating values by Fiscal Week and Channel?

Hello, 

I am trying to aggregate data by fiscal week and also by channel (Online/Store).
I have a Revenue that looks like this:

slavisha84_0-1618256589663.png

 

And i have FiscalCalendar table:

slavisha84_2-1618256697203.png


I need to create a new table where i will summarise the Revenue values by fiscal week and Channell storing each year's value in a separate column lik this: 

slavisha84_3-1618257213301.png

 

So far I was able to get a summary by fiscal week for each year but I need to add a Channel breakdown as well:

slavisha84_4-1618257340882.png

 

How do I add the Channel breakdown to this function?

If you need sample data, I am uploading it to the shared folder below:

https://1drv.ms/u/s!AhhZq1add5YwjYIvuASi76lCL3R1eA?e=sZQshq

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@slavisha84 , Try a new table like

Summarize(revenue, Revenue[channel], FiscalCalendar[Week], "2020", calculate(sum(Revenue[revenue]), filter(FiscalCalendar,FiscalCalendar[Year] =2020))
, "2021", calculate(sum(Revenue[revenue]), filter(FiscalCalendar,FiscalCalendar[Year] =2021)))

 

if need move 2020 and 2021 to addcolumns , like your script

 

View solution in original post

2 REPLIES 2
slavisha84
Helper I
Helper I

@amitchandak Thank you, this worked. 

amitchandak
Super User
Super User

@slavisha84 , Try a new table like

Summarize(revenue, Revenue[channel], FiscalCalendar[Week], "2020", calculate(sum(Revenue[revenue]), filter(FiscalCalendar,FiscalCalendar[Year] =2020))
, "2021", calculate(sum(Revenue[revenue]), filter(FiscalCalendar,FiscalCalendar[Year] =2021)))

 

if need move 2020 and 2021 to addcolumns , like your script

 

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.